public void CanInsertAreaIntoDatabase() { using (var context1 = new SACOMaintenanceContext()) { context1.Database.EnsureDeleted(); context1.Database.EnsureCreated(); } var nameOfArea = "New area addition and testing"; var area = new Area(); area.AreaName = nameOfArea; AreaProvider areaProvider = new AreaProvider(); areaProvider.AddEditArea(area); var foundArea = new Area(); foundArea = areaProvider.FindAreaByName(nameOfArea); Assert.AreEqual(nameOfArea, foundArea.AreaName); }
public void CanInsertFactoryIntoDatabase() { using (var context = new SACOMaintenanceContext()) { context.Database.EnsureDeleted(); context.Database.EnsureCreated(); var factory = new Factory(); factory.FactoryName = "Factory testing"; var factory1 = new Factory(); factory1.FactoryName = "This is another factory"; context.Factories.Add(factory); context.Factories.Add(factory1); context.SaveChanges(); Assert.AreNotEqual(0, factory.Id); } }
public PPEDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _ppeDBContext = sacoMaintenanceContext; }
public AuthorizationDataProvider(SACOMaintenanceContext sacoContext) { _sacoContext = sacoContext; }
public StatusDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _statusDBContext = sacoMaintenanceContext; }
public IsolationDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { _maintenanceDBContext = sacoMaintenanceContext; }
public FactoryDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _factoryDBContext = sacoMaintenanceContext; }
public DepartmentDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { _sacoMaintenanceContext = sacoMaintenanceContext; }
public SupplierDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { _sacoMaintenanceContext = sacoMaintenanceContext; }
public AreaProvider(SACOMaintenanceContext sacoMaintenanceContext) { _areaDBContext = sacoMaintenanceContext; }
public GeneralRequestDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { _sacoMaintenanceContext = sacoMaintenanceContext; }
public RiskDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _sacoMaintenanceContext = sacoMaintenanceContext; }
public CompanyDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _companyDBContext = sacoMaintenanceContext; }
public PlantRequestDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _areaDBContext = sacoMaintenanceContext; }
public PartDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { _sacoMaintenanceContext = sacoMaintenanceContext; }
public EquipmentDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { //SacoMaintenanceContext = new SACOMaintenanceContext(); _equipmentDBContext = sacoMaintenanceContext; }
public UsersDataProvider(SACOMaintenanceContext usersContext) { _usersContext = usersContext; }
public MachineTypeDataProvider(SACOMaintenanceContext sacoMaintenanceContext) { _machineTypeDBContext = sacoMaintenanceContext; }
public MaintReqUsersAssigneddataProvider(SACOMaintenanceContext dbContext) { _dbContext = dbContext; }
public MaintRequestInitiationDataProvider(SACOMaintenanceContext sacoMaintenanceContext, SACOMaintenanceContext sacoMaintenanceContext2) { _requestInitationDBContext = sacoMaintenanceContext; _requestInitationDBContext2 = sacoMaintenanceContext2; }
public PrioritiesDataProvider(SACOMaintenanceContext sacoMaintContext) { _sacoMaintContext = sacoMaintContext; }