public void RetreiveTest() { var orderRepository = new OrderRepository(); var expected = new Order(10) { OrderDate = new DateTimeOffset(DateTime.Now.Year, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)), }; var actual = orderRepository.Retreive(10); Assert.AreEqual(expected.OrderDate, actual.OrderDate); }
public void RetrieveExisting() { // Arrange var orderRepository = new OrderRepository(); var expected = new Order(10) { OrderDate = new DateTimeOffset(2014, 11, 1, 2, 3, 33, new TimeSpan(2, 0, 0)) }; // Act var actual = orderRepository.Retreive(10); // Assert Assert.AreEqual(expected.OrderId, actual.OrderId); Assert.AreEqual(expected.OrderDate, actual.OrderDate); }