コード例 #1
0
        public void ShouldReturnSameAmountAsInRepository()
        {
            var items = new List <Person>();

            items.Add(new Person()
            {
                Id = Guid.Parse("cdadf561-2c0d-e611-aaf6-38607729f0cd")
            });
            items.Add(new Person()
            {
                Id = Guid.Parse("ceadf561-2c0d-e611-aaf6-38607729f0cd")
            });
            items.Add(new Person()
            {
                Id = Guid.Parse("cfadf561-2c0d-e611-aaf6-38607729f0cd")
            });

            var repositoryFactory = new CustomisableRepositoryFactory <Person>(items);

            claimerList = new SqlClaimerList(repositoryFactory);

            var persons = claimerList.Get();

            Assert.That(persons.Count(), Is.EqualTo(3));
        }
コード例 #2
0
        public void ShouldReturListOfPerson()
        {
            var items = new List <Person>();

            items.Add(new Person()
            {
                Id = Guid.Parse("cdadf561-2c0d-e611-aaf6-38607729f0cd")
            });
            items.Add(new Person()
            {
                Id = Guid.Parse("ceadf561-2c0d-e611-aaf6-38607729f0cd")
            });
            items.Add(new Person()
            {
                Id = Guid.Parse("cfadf561-2c0d-e611-aaf6-38607729f0cd")
            });

            var repositoryFactory = new CustomisableRepositoryFactory <Person>(items);

            claimerList = new SqlClaimerList(repositoryFactory);
            var result = claimerList.Get();

            Assert.That(result, Is.InstanceOf <List <Person> >());
        }