コード例 #1
0
        public void CellConstructorTest()
        {
            /*** ARRANGE ***/
            Alphabet alphabet = null; // TODO: Initialize to an appropriate value

            /*** ACT ***/
            Cell target = new Cell(alphabet);

            /*** ASSERT ***/
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
コード例 #2
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.");
 }
コード例 #3
0
 /// <summary>
 /// Raises the CellSolved event.
 /// </summary>
 protected virtual void OnCellSolved(Cell cell)
 {
     this.SolveCount++;
     var e = CellSolved;
     if (e != null)
         e(this, new CellEventArgs(cell));
 }
コード例 #4
0
 /// <summary>
 /// Raises the CellChanged event.
 /// </summary>
 protected virtual void OnCellChanged(Cell cell)
 {
     var e = CellChanged;
     if (e != null)
         e(this, new CellEventArgs(cell));
 }
コード例 #5
0
 public void ReportCellSolved(Cell cell)
 {
     OnCellSolved(cell);
 }
コード例 #6
0
 public void ReportCellChanged(Cell cell)
 {
     OnCellChanged(cell);
 }
コード例 #7
0
 public void IsSolvedTest()
 {
     Alphabet alphabet = null; // TODO: Initialize to an appropriate value
     Cell target = new Cell(alphabet); // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.IsSolved;
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #8
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));
        }
コード例 #9
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
        }