コード例 #1
0
        public void AddRange()
        {
            var repo = this.getRepo();

            var customers = new List <Implementations.DomainObjects.Customer>();

            var customer1 = new Implementations.DomainObjects.Customer()
            {
                Name = "Amanda Clement"
            };

            var customer2 = new Implementations.DomainObjects.Customer()
            {
                Name = "Kevin Ronalds"
            };

            customers.Add(customer1);
            customers.Add(customer2);

            repo.AddRange(customers);

            var result = repo.Count();

            result.Should().Be(4);
        }
コード例 #2
0
        public void Add()
        {
            var repo = this.getRepo();

            int count = repo.Count();

            count.Should().Be(2);

            var customer = new Implementations.DomainObjects.Customer()
            {
                Name = "Amanda Clement"
            };

            var x = repo.Add(customer);

            count = repo.Count();

            count.Should().Be(3);
        }