Пример #1
0
        private UserRepository getRepo()
        {
            var opts = new AcmeDirectorySearch.Infrastructure.DatabaseOptions();

            opts.ConnectionString = fixture.DatabaseConnectionString;

            var iopts = Options.Create <AcmeDirectorySearch.Infrastructure.DatabaseOptions>(opts);

            return(new UserRepository(iopts));
        }
        public async void Validate_Get_States()
        {
            var opts = new AcmeDirectorySearch.Infrastructure.DatabaseOptions();

            opts.ConnectionString = fixture.DatabaseConnectionString;

            var iopts = Options.Create <AcmeDirectorySearch.Infrastructure.DatabaseOptions>(opts);
            var repo  = new PropertyRepository(iopts);

            var results = await repo.GetStates();

            Assert.Equal(50, results.ToList <string>().Count);
        }