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.assAnswerBinaryState.php';
34 $this->assertInstanceOf(
'ASS_AnswerBinaryState', $instance);
40 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
45 $instance->setState($expected);
46 $actual = $instance->getState();
49 $this->assertEquals($expected, $actual);
55 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
60 $instance->setState($expected);
61 $actual = $instance->isStateChecked();
64 $this->assertEquals($expected, $actual);
70 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
75 $instance->setState($expected);
76 $actual = $instance->isStateSet();
79 $this->assertEquals($expected, $actual);
85 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
90 $instance->setState($expected);
91 $actual = !$instance->isStateUnset();
94 $this->assertEquals($expected, $actual);
100 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
105 $instance->setState($expected);
106 $actual = !$instance->isStateUnchecked();
109 $this->assertEquals($expected, $actual);
115 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
118 $instance->setState($expected);
121 $instance->setChecked();
122 $actual = $instance->isStateUnchecked();
125 $this->assertEquals($expected, $actual);
131 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
134 $instance->setState($expected);
137 $instance->setUnchecked();
138 $actual = $instance->isStateUnchecked();
141 $this->assertEquals($expected, $actual);
147 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
150 $instance->setState($expected);
154 $actual = $instance->isStateUnchecked();
157 $this->assertEquals($expected, $actual);
163 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
166 $instance->setState($expected);
169 $instance->setUnset();
170 $actual = $instance->isStateUnchecked();
173 $this->assertEquals($expected, $actual);
test_instantiateObject_shouldReturnInstance()
test_setGetState_shouldReturnUnchangedState()
test_setChecked_shouldAlterState()
test_setUnchecked_shouldAlterState()
test_isStateUnchecked_shouldReturnActualState()
test_isStateSet_shouldReturnActualState()
test_isStateUnset_shouldReturnActualState()
test_setSet_shouldAlterState()
test_isStateChecked_shouldReturnActualState()
test_setUnset_shouldAlterState()
Class for true/false or yes/no answers.