public void SerialNumberCloneTest() { var cloneDispenser = _dispenser.Clone(); var setableDisk = cloneDispenser.SymbolDisks.OfType <SetableNumberDisk>().Last(); setableDisk.Skip = 1; var expectedSerialNumber = cloneDispenser.First(); Assert.AreEqual(expectedSerialNumber, "Test-甲-A1"); Assert.AreNotEqual(cloneDispenser.Skip(2).First(), _dispenser.Skip(2).First()); }
public void TestStartNumberSetting() { Dispenser dispenser = FormatParser.Parse(_testSerailNumberFormatString); var expectedSerialNumber = "TEST20180517-乙Y39"; dispenser.SetStartNumber(expectedSerialNumber); var startSerialNumber = dispenser.First(); Assert.AreEqual(expectedSerialNumber, startSerialNumber); var sencondSerialNumber = dispenser.Skip(1).First(); Assert.AreEqual("TEST20180517-乙Y40", sencondSerialNumber); }