Ejemplo n.º 1
0
        public void RetrieveOrderDisplayTest()
        {
            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.Retrieve(10);

            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 2
0
        public void OrderRepoRetrieveExistingInvalid()
        {
            var orderRepo = new OrderRepository();
            var expected  = new Order(10)
            {
                OrderDate = new DateTimeOffset(214, TimeSpan.Zero)
            };

            var actual = orderRepo.Retrieve(10);

            Assert.AreNotEqual(expected, actual);
        }
Ejemplo n.º 3
0
        public void RetrieveExisting()
        {
            var orderRepository = new OrderRepository();
            var actual          = orderRepository.Retrieve(10);

            actual.OrderDate = new DateTimeOffset(2016, 12, 13, 0, 0, 0, new TimeSpan(-7, 0, 0));

            var expected = new Order(10);

            expected.OrderDate = new DateTimeOffset(2016, 12, 13, 0, 0, 0, new TimeSpan(-7, 0, 0));

            Assert.AreEqual(actual.OrderDate, expected.OrderDate);
        }
Ejemplo n.º 4
0
        public void RetrieveValid()
        {
            var orderRepository = new OrderRepository();
            var expected        = new Order(10)
            {
                OrderDate = new DateTimeOffset(DateTime.Now.Year, 3, 23, 7, 23, 0,
                                               new TimeSpan(2, 0, 0))
            };

            var actual = orderRepository.Retrieve(10);

            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 5
0
        public void RetrieveValid()
        {
            // Arrange
            var orderRepository = new OrderRepository();
            var expected        = new Order(1)
            {
                OrderDate = new DateTimeOffset(2019, 12, 11, 11, 43, 21, new TimeSpan(0, 0, 0))
            };
            // Act
            var actual = orderRepository.Retrieve(1);

            // Assert
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 6
0
        public void RetrieveValid()
        {
            //--ARRANGE
            OrderRepository orderRepo = new OrderRepository();
            var             expected  = new Order(10)
            {
                OrderDate = new DateTimeOffset(DateTime.Now.Year, 4, 14, 10, 00, 00, 00, new TimeSpan(7, 0, 0)),
            };
            //--ACT
            var actual = orderRepo.Retrieve(10);

            //--ASSERT
            Assert.Equal(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 7
0
        public void RetrieveTest()
        {
            //-- Arrange
            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))
            };
            //--Act
            var actual = orderRepository.Retrieve(10);

            //--Assert
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
        public void RetrieveValid()
        {
            // Arrange
            OrderRepository orderRepository = new OrderRepository();

            var expected = new Order(1)
            {
                OrderDate = new DateTimeOffset(DateTime.Now.Year, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0))
            };

            // Act
            var actual = orderRepository.Retrieve(1);

            actual.Should().BeEquivalentTo(expected);
        }
Ejemplo n.º 9
0
        public void TestMethod1()
        {
            //Arrange
            OrderRepository orderRepository = new OrderRepository();
            var             expected        = new Order(1)
            {
                OrderDate = new DateTime(2020, 10, 9)
            };

            //Act
            var actual = orderRepository.Retrieve(1);

            //Assert
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 10
0
        public void RetrieveExisting()
        {
            //Arrange
            Order expected = new Order();

            expected.OrderDate = new DateTimeOffset(2019, 3, 4, 22, 11, 0, TimeSpan.FromHours(8.5));

            OrderRepository orderRepository = new OrderRepository();

            //Act
            Order actual = orderRepository.Retrieve(1);

            //Assert
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 11
0
        public void Retrieve()
        {
            // Arrange
            OrderRepository orderRepository = new OrderRepository();
            var             expected        = new Order()
            {
                OrderDate = new DateTimeOffset(2019, 2, 28, 10, 18, 0, TimeSpan.FromHours(+3))
            };

            //Act
            var actual = orderRepository.Retrieve(10);

            //Assert
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
        public void RetrieveValid()
        {
            //-- Arrange
            var orderRepository = new OrderRepository();
            var expected        = new Order(1)
            {
                OrderDate = DateTime.Today
            };

            //-- Act
            var actual = orderRepository.Retrieve(1);

            //--Assert
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 13
0
        public void RetrieveValid()
        {
            //-- Arrange
            var orderRepository = new OrderRepository();
            var expected        = new Order(3)
            {
                OrderDate = new DateTimeOffset(DateTime.Now.Year, 12, 31, 10, 00, 00, new TimeSpan(7, 0, 0))
            };

            //-- Act
            var actual = orderRepository.Retrieve(3);

            //-- Assert
            Assert.AreEqual(expected.OrderId, actual.OrderId);
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
        public void RetrieveOrderDisplayTest()
        {
            //arrange
            var oder = new Order(10)
            {
                OrderDate = new DateTimeOffset(DateTime.Now.Year, 4, 14, 10, 00, 00,
                                               new TimeSpan(7, 0, 0))
            };
            var orderRepository = new OrderRepository();

            //action
            var result = orderRepository.Retrieve(10);

            //assert
            Assert.Equal(oder.OrderDate, result.OrderDate);
        }
Ejemplo n.º 15
0
        public void RetrieveValid()
        {
            //Assert
            var orderRepo = new OrderRepository();

            var expected = new Order(1)
            {
                OrderDate = new DateTimeOffset(DateTime.Now.Year, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0))
            };

            //Act
            var actual = orderRepo.Retrieve(1);

            //Arrange
            Assert.AreEqual(actual.OrderDate, expected.OrderDate);
        }
Ejemplo n.º 16
0
        public void RetrieveValid()
        {
            // -- Arrange
            var orderRepository = new OrderRepository();
            var expected        = new Order(1)
            {
                PurchasePrice = 5.5m,
                OrderDate     = new DateTime(DateTime.Now.Year, 4, 14, 10, 00, 00)
            };

            // -- Act
            var actual = orderRepository.Retrieve(1);

            // -- Assert
            Assert.AreEqual(expected.PurchasePrice, actual.PurchasePrice);
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
        }
Ejemplo n.º 17
0
        public void RetrieveTest()
        {
            //-- Arrange
            var OrderRepository = new OrderRepository();
            var expected        = new Order(10)
            {
                CustomerId = 1,
                OrderDate  = new DateTimeOffset(DateTime.Now.Year, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)),
                //ShippingAddress = "Hobbiton, Baggs End"
            };

            //-- Act
            var actual = OrderRepository.Retrieve(10);

            //-- Assert
            Assert.AreEqual(expected.CustomerId, actual.CustomerId);
            Assert.AreEqual(expected.OrderDate, actual.OrderDate);
            //Assert.AreEqual(expected.ShippingAddress, actual.ShippingAddress);
        }