37 if (defined(
'ILIAS_PHPUNIT_CONTEXT'))
39 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
40 ilUnitUtil::performInitialisation();
44 chdir( dirname( __FILE__ ) );
52 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
57 $this->assertInstanceOf(
'ASS_AnswerBinaryState', $instance);
63 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
68 $instance->setState($expected);
69 $actual = $instance->getState();
72 $this->assertEquals($expected, $actual);
78 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
83 $instance->setState($expected);
84 $actual = $instance->isStateChecked();
87 $this->assertEquals($expected, $actual);
94 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
99 $instance->setState($expected);
100 $actual = $instance->isStateSet();
103 $this->assertEquals($expected, $actual);
110 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
115 $instance->setState($expected);
116 $actual = !$instance->isStateUnset();
119 $this->assertEquals($expected, $actual);
126 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
131 $instance->setState($expected);
132 $actual = !$instance->isStateUnchecked();
135 $this->assertEquals($expected, $actual);
141 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
144 $instance->setState($expected);
147 $instance->setChecked();
148 $actual = $instance->isStateUnchecked();
151 $this->assertEquals($expected, $actual);
157 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
160 $instance->setState($expected);
163 $instance->setUnchecked();
164 $actual = $instance->isStateUnchecked();
167 $this->assertEquals($expected, $actual);
173 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
176 $instance->setState($expected);
180 $actual = $instance->isStateUnchecked();
183 $this->assertEquals($expected, $actual);
189 require_once
'./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php';
192 $instance->setState($expected);
195 $instance->setUnset();
196 $actual = $instance->isStateUnchecked();
199 $this->assertEquals($expected, $actual);