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.assAnswerTrueFalse.php';
34 $this->assertInstanceOf(
'ASS_AnswerTrueFalse', $instance);
40 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
45 $instance->setCorrectness($expected);
46 $actual = $instance->getCorrectness();
49 $this->assertEquals($expected, $actual);
55 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
60 $instance->setCorrectness($expected);
63 $this->assertEquals($expected, $instance->isTrue());
64 $this->assertEquals($expected, $instance->isCorrect());
70 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
75 $instance->setCorrectness(
true);
78 $this->assertEquals($expected, $instance->isFalse());
79 $this->assertEquals($expected, $instance->isIncorrect());
87 $this->markTestIncomplete(
'Bug detected, fix not applied yet due to poor coverage.');
90 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
95 $instance->setFalse();
96 $actual = $instance->getCorrectness();
99 $this->assertEquals($expected, $actual);
105 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
110 $instance->setTrue();
111 $actual = $instance->isTrue();
114 $this->assertEquals($expected, $actual);
120 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerTrueFalse.php';
125 $instance->setFalse();
126 $actual = $instance->isFalse();
129 $this->assertEquals($expected, $actual);
test_setFalseIsFalse_shouldReturnUnchangedState()
test_setGetCorrectness_shouldReturnUnchangedState()
test_isTrue_shouldReturnTrue()
test_isFalse_shouldReturnFalseOnTrueState()
test_setTrueIsTrue_shouldReturnUnchangedState()
test_setFalseGetCorrectness_shouldReturnFalse()
: Fix bug! getCorrectness returns int instead of bool.
test_instantiateObject_shouldReturnInstance()
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Class for true/false or yes/no answers.