public void TestParseOrderQuantity() { // arrange string line = "[email protected] 2021-03-27 12:12 P01 1"; string[] words = line.Split(' '); int expectedQnty = 1; // act ReportsGenerator.TryParseOrder(words, out Order order); var item = order.Items; var pQnty = item[0].Quantity; // assert Convert.ToInt32(pQnty).Should().Be(expectedQnty); }
public void TestParseOrderCode() { // arrange string line = "[email protected] 2021-03-27 12:12 P01 1"; string[] words = line.Split(' '); string expectedCode = "P01"; // act ReportsGenerator.TryParseOrder(words, out Order order); var item = order.Items; var pCode = item[0].ProductCode.ToString(); // assert pCode.Should().Be(expectedCode); }