public void Test_resetToOrigSeq_beacon() { // Arrange uint[] seq1 = new uint[] { 1, 2, 3, 4, 5 }; uint[] seq2 = new uint[] { 6, 7, 8, 9, 10 }; beacon obj; int expectedSignal1 = 5; int expectedSignal2 = 10; int expectedSignal3 = 5; // Act obj = new beacon(seq1); obj.switchOnOff(); int signal1 = obj.emitSignal(); obj.newSeq(seq2); int signal2 = obj.emitSignal(); obj.resetToOrigSeq(); int signal3 = obj.emitSignal(); // Assert Assert.AreEqual(expectedSignal1, signal1); Assert.AreEqual(expectedSignal2, signal2); Assert.AreEqual(expectedSignal3, signal3); }
public void Test_newSeq_beacon() { // Arrange uint[] origSeq = new uint[] { 1, 2, 3, 4, 5, }; uint[] newSeq = new uint[] { 6, 7, 8, 9 }; int expectedSignal1 = 5; int expectedSignal2 = 9; beacon obj; // Act obj = new beacon(origSeq); obj.switchOnOff(); int signal1 = obj.emitSignal(); obj.newSeq(newSeq); int signal2 = obj.emitSignal(); // Assert Assert.AreEqual(expectedSignal1, signal1); Assert.AreEqual(expectedSignal2, signal2); }