public void TestNumGen3() { //Arrange arithS AS = new arithS(); int numGenCount; //Act AS.next(); AS.next(); AS.reset(); numGenCount = AS.numGen(); //Assert Assert.AreEqual(0, numGenCount); }
public void TestNext3() { //Arrange int commonDiff = 4; arithS AS = new arithS(commonDiff); int nextcall; //Act AS.next(); AS.next(); nextcall = AS.next(); //Assert Assert.AreEqual(12, nextcall); }
public void TestNext5() { //Arrange int commonDiff = 2; int calls = 6; arithS AS = new arithS(commonDiff); int[] forbidden = { 10, 12, 14, 16, 18 }; AS.setForbiddenSet(forbidden); int nextcall; //Act for (int i = 0; i < calls; i++) { AS.next(); } nextcall = AS.next(); //Assert Assert.AreEqual(-1, nextcall); }
public void TestNext1() { //Arrange arithS AS = new arithS(); int nextcall; //Act nextcall = AS.next(); //Assert Assert.AreEqual(2, nextcall); }
public void TestNext2() { //Arrange int commonDiff = 3; arithS AS = new arithS(commonDiff); int nextcall; //Act nextcall = AS.next(); //Assert Assert.AreEqual(3, nextcall); }
public void TestMode1() { //Arrange int commonDiff = 2; int calls = 6; arithS AS = new arithS(commonDiff); int[] forbidden = { 6, 8, 10, 12, 14 }; string mode; //Act for (int i = 0; i < calls; i++) { AS.next(); } mode = AS.getMode(); //Assert Assert.AreEqual("forbidden advance", mode); }