public void Test_resetToOrigSeq_quirkyBeacon() { // Arrange uint[] seq1 = new uint[] { 1, 2, 3, 4, 5 }; uint[] seq2 = new uint[] { 6, 7, 8, 9 }; quirkyBeacon obj; int expectedSignal1 = 15; int expectedSignal2 = 3; int expectedSignal3 = 15; // Act obj = new quirkyBeacon(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_quirkyBeacon() { // Arrange uint[] origSeq = new uint[] { 1, 2, 3, 4, 5, }; uint[] newSeq = new uint[] { 6, 7, 8, 9 }; int expectedSignal1 = 15; int expectedSignal2 = 3; quirkyBeacon obj; // Act obj = new quirkyBeacon(origSeq); obj.switchOnOff(); int signal1 = obj.emitSignal(); obj.newSeq(newSeq); int signal2 = obj.emitSignal(); // Assert Assert.AreEqual(expectedSignal1, signal1); Assert.AreEqual(expectedSignal2, signal2); }