Exemplo n.º 1
0
 public void CanBeTest()
 {
     Alphabet alphabet = null; // TODO: Initialize to an appropriate value
     Cell target = new Cell(alphabet); // TODO: Initialize to an appropriate value
     int value = 0; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.CanBe(value);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Exemplo n.º 2
0
        public void ValueTest()
        {
            /*** ARRANGE ***/
            Alphabet alphabet = CreateDefaultAlphabet();
            Cell target = new Cell(alphabet);
            int expected = 3;                   // arbitrary
            int actual;

            /*** ACT ***/
            target.Value = expected;

            /*** ASSERT ***/
            actual = target.Value;
            Assert.AreEqual(expected, actual);  // value setting successful

            alphabet.Remove(expected);          // cell can be no other value
            foreach (int value in alphabet)
                Assert.IsFalse(target.CanBe(value));
        }
Exemplo n.º 3
0
        public void RemovePossibilityTest()
        {
            /*** ARRANGE ***/
            Alphabet alphabet = CreateDefaultAlphabet();
            Cell target = new Cell(alphabet);
            int value = 3;                              // arbitrary

            /*** ACT ***/
            target.RemovePossibility(value);

            /*** ASSERT ***/
            Assert.IsFalse(target.CanBe(value));        // value is no longer a possible value
            Assert.IsTrue(alphabet.Contains(value));    // alphabet remains unchanged
        }