public void ParseSerialNumber_given_invalid_year_throws_new_ArgumentException(int year) { //Arrange var serialParser = new SerialNumberParser(); //Act //Assert Assert.Throws <ArgumentException>(() => serialParser.Parse(year, 2)); }
public void ParseSerialNumber_given_valid_serial_number_returns_correct_year(int yearEnding, int serialNumber, int year) { //Arrange var serialParser = new SerialNumberParser(); //Act var result = serialParser.Parse(yearEnding, serialNumber); //Assert Assert.Equal(year, result); }