public void ShouldProvideStatementsForCustomer()
        {
            var repository = new StatementRepository();

            var c1 = new Customer("One");
            var c2 = new Customer("Two");

            var statement = new Statement(c1);
            repository.Add(statement);

            repository.Add(new Statement(c2));

            var c1statements = repository.FindByCustomer(c1);

            Assert.That(c1statements.Contains(statement));
            Assert.That(c1statements.Count(), Is.EqualTo(1));
        }
Example #2
0
 public StatementsController(StatementRepository repository, Customer customer)
 {
     this.repository = repository;
     this.customer = customer;
 }
 public void SetUp()
 {
     customer = new Customer();
     repository = new StatementRepository();
     controller = new StatementsController(repository, customer);
 }