Example #1
0
        public void TestAddLibraryCardIntegrationTest()
        {
            var orch = DependencyFactory.Resolve <ILibraryCardOrchestrator>();

            var response = orch.AddLibraryCard(new LibraryCardBuilder().JohnDoeCard().Build());
            var expected = new LibraryCardBuilder(response.Id).JohnDoeCard(response.Customer).Build();

            Assert.IsNotNull(response);
            var comparison = Utilities.CompareObjects(expected, response);

            Assert.IsTrue(comparison.AreEqual);
        }
        public void AdapterAddLibraryCardTest()
        {
            var customer = CustomerWaldo.PrepareJohnDoeCustomer();

            var expected = new LibraryCardBuilder().JohnDoeCard(customer).Build();
            var adapter  = new LibraryCardAdapter();

            var response = adapter.AddLibraryCard(expected);

            Assert.IsNotNull(response);
            var comparison = Utilities.CompareObjects(expected, response);

            Assert.IsTrue(comparison.AreEqual, $"Expected [{expected}] Actual [{response}]");
        }