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); }
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); }
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); }
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(); }
public void TestInitialize() { NatureRecorderDbContext context = new NatureRecorderDbContextFactory().CreateInMemoryDbContext(); _factory = new NatureRecorderFactory(context); }