예제 #1
0
        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);
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
 public PPEDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _ppeDBContext = sacoMaintenanceContext;
 }
 public AuthorizationDataProvider(SACOMaintenanceContext sacoContext)
 {
     _sacoContext = sacoContext;
 }
예제 #5
0
 public StatusDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _statusDBContext = sacoMaintenanceContext;
 }
 public IsolationDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _maintenanceDBContext = sacoMaintenanceContext;
 }
예제 #7
0
 public FactoryDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _factoryDBContext = sacoMaintenanceContext;
 }
예제 #8
0
 public DepartmentDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _sacoMaintenanceContext = sacoMaintenanceContext;
 }
 public SupplierDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _sacoMaintenanceContext = sacoMaintenanceContext;
 }
예제 #10
0
 public AreaProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _areaDBContext = sacoMaintenanceContext;
 }
예제 #11
0
 public GeneralRequestDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _sacoMaintenanceContext = sacoMaintenanceContext;
 }
예제 #12
0
 public RiskDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _sacoMaintenanceContext = sacoMaintenanceContext;
 }
예제 #13
0
 public CompanyDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _companyDBContext = sacoMaintenanceContext;
 }
예제 #14
0
 public PlantRequestDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _areaDBContext = sacoMaintenanceContext;
 }
예제 #15
0
 public PartDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _sacoMaintenanceContext = sacoMaintenanceContext;
 }
예제 #16
0
 public EquipmentDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     //SacoMaintenanceContext = new SACOMaintenanceContext();
     _equipmentDBContext = sacoMaintenanceContext;
 }
예제 #17
0
 public UsersDataProvider(SACOMaintenanceContext usersContext)
 {
     _usersContext = usersContext;
 }
예제 #18
0
 public MachineTypeDataProvider(SACOMaintenanceContext sacoMaintenanceContext)
 {
     _machineTypeDBContext = sacoMaintenanceContext;
 }
예제 #19
0
 public MaintReqUsersAssigneddataProvider(SACOMaintenanceContext dbContext)
 {
     _dbContext = dbContext;
 }
예제 #20
0
 public MaintRequestInitiationDataProvider(SACOMaintenanceContext sacoMaintenanceContext,
                                           SACOMaintenanceContext sacoMaintenanceContext2)
 {
     _requestInitationDBContext  = sacoMaintenanceContext;
     _requestInitationDBContext2 = sacoMaintenanceContext2;
 }
 public PrioritiesDataProvider(SACOMaintenanceContext sacoMaintContext)
 {
     _sacoMaintContext = sacoMaintContext;
 }