public void ShouldCreateANewCustomer()
        {
            var email        = "*****@*****.**";
            var customerRepo = new Mock <ICustomerRepository>();

            customerRepo.Setup(c => c.TryGetCustomerFromEmail(It.IsAny <string>()))
            .Returns((Customer)null);
            var sut = new GetCustomerStep(customerRepo.Object, new CustomerStatusLevelRepository());

            var orderContext = new OrderContext(new Order()
            {
                EmailAddress = email
            });

            sut.Run(orderContext);


            Assert.IsNotNull(orderContext.Customer);
            Assert.AreEqual(email, orderContext.Customer.Email);
        }
        public void ShouldPullCustomerFromRepo()
        {
            var customer     = new Customer("*****@*****.**", "Hans", new Status("gnu", 0));
            var customerRepo = new Mock <ICustomerRepository>();

            customerRepo.Setup(c => c.TryGetCustomerFromEmail(It.IsAny <string>()))
            .Returns(customer);


            var sut = new GetCustomerStep(customerRepo.Object, new CustomerStatusLevelRepository());

            var orderContext = new OrderContext(new Order()
            {
                EmailAddress = customer.Email
            });

            sut.Run(orderContext);

            customerRepo.Verify(c => c.TryGetCustomerFromEmail(customer.Email), Times.Once);
            Assert.IsNotNull(orderContext.Customer);
            Assert.AreEqual(customer.Email, orderContext.Customer.Email);
        }