示例#1
0
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);
            _factory.Categories.Add(EntityName);
        }
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);
            _factory.Locations.Add(EntityName, Address, City, County, Postcode, Country, Latitude, Longitude);
        }
示例#3
0
        public CommandRunner(CommandMode mode)
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateDbContext(null);

            _factory = new NatureRecorderFactory(context);
            Mode     = mode;
        }
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);

            _currentFolder = Path.GetDirectoryName(Assembly.GetAssembly(typeof(SightingsImportExportManagerTest)).Location);
        }
示例#5
0
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);

            _currentFolder = Path.GetDirectoryName(Assembly.GetAssembly(typeof(DataMaintenanceCommandTest)).Location);
        }
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory  = new NatureRecorderFactory(context);
            _schemeId = _factory.StatusSchemes.Add(SchemeName).Id;
            _ratingId = _factory.StatusRatings.Add(RatingName, SchemeName).Id;
        }
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);

            User user = _factory.Users.AddUser(UserName, Password);

            _factory.Context.SaveChanges();
            _userId = user.Id;
        }
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);
            Location location = _factory.Locations.Add(LocationName, Address, City, County, Postcode, Country, Latitude, Longitude);

            _factory.Categories.Add(CategoryName);
            Species species = _factory.Species.Add(SpeciesName, CategoryName);

            _sightingId = _factory.Sightings.Add(0, Gender.Unknown, false, DateTime.Now, location.Id, species.Id).Id;
        }
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);
            _factory.Categories.Add(CategoryName);
            _factory.Species.Add(SpeciesName, CategoryName);

            _factory.StatusSchemes.Add(SchemeName);
            _factory.StatusRatings.Add(RatingName, SchemeName);

            _factory.SpeciesStatusRatings.SetRating(SpeciesName, RatingName, SchemeName);
        }
示例#10
0
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory  = new NatureRecorderFactory(context);
            _schemeId = _factory.StatusSchemes.Add(EntityName).Id;
            _factory.Context.StatusRatings.Add(new StatusRating {
                Name = "Red", StatusSchemeId = _schemeId
            });
            _factory.Context.StatusRatings.Add(new StatusRating {
                Name = "Amber", StatusSchemeId = _schemeId
            });
            _factory.Context.StatusRatings.Add(new StatusRating {
                Name = "Green", StatusSchemeId = _schemeId
            });
            _factory.Context.SaveChanges();
        }
示例#11
0
        public void TestInitialize()
        {
            NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext();

            _factory = new NatureRecorderFactory(context);
        }