17 if (
defined(
'ILIAS_PHPUNIT_CONTEXT')) {
18 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
19 ilUnitUtil::performInitialisation();
21 chdir(dirname(__FILE__));
29 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
34 $this->assertInstanceOf(
'ASS_AnswerSimple', $instance);
40 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
45 $instance->setId($expected);
46 $actual = $instance->getId();
49 $this->assertEquals($expected, $actual);
55 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
57 $expected =
'The answer, of course, is 42.';
60 $instance->setAnswertext($expected);
61 $actual = $instance->getAnswertext();
64 $this->assertEquals($expected, $actual);
70 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
75 $instance->setPoints($expected);
76 $actual = $instance->getPoints();
79 $this->assertEquals($expected, $actual);
87 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
92 $instance->setPoints(
'Günther');
93 $actual = $instance->getPoints();
96 $this->assertEquals($expected, $actual);
102 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerSimple.php';
107 $instance->setOrder($expected);
108 $actual = $instance->getOrder();
111 $this->assertEquals($expected, $actual);
test_setGetPoints_shouldReturnUnchangedZeroOnNonNumericInput()
Class for simple answers.
test_setGetPoints_shouldReturnUnchangedPoints()
test_setGetAnswertext_shouldReturnUnchangedAnswertext()
test_setGetOrder_shouldReturnUnchangedOrder()
test_setGetId_shouldReturnUnchangedId()
test_instantiateObject_shouldReturnInstance()
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'