Example #1
0
        public RequisicoesSimplificadasController(IOptions <NAVConfigurations> appSettings, IOptions <NAVWSConfigurations> NAVWSConfigs, IHostingEnvironment _hostingEnvironment, IOptions <GeneralConfigurations> appSettingsGeneral)
        {
            this.configws            = NAVWSConfigs.Value;
            this._hostingEnvironment = _hostingEnvironment;
            _generalConfig           = appSettingsGeneral.Value;

            register = new ProjetosController(appSettings, NAVWSConfigs, _hostingEnvironment, appSettingsGeneral);
        }
Example #2
0
        public ProjetosControllerTest()
        {
            var optionsBuilder = new DbContextOptionsBuilder <ApplicationDbContext>();

            optionsBuilder.UseSqlServer("Server = tcp:dbmproject20180525110553dbserver.database.windows.net,1433; Initial Catalog = GPprojeto_db; Persist Security Info = False; User ID = Projetom7; Password =M7projeto_2018; MultipleActiveResultSets = False; Encrypt = True; TrustServerCertificate = False; Connection Timeout = 30");
            _context = new ApplicationDbContext(optionsBuilder.Options);

            _controller = new ProjetosController(_context, null);
        }
        public ProjetoTest()
        {
            empresa = new Empresa {
                Nome = "Casas Bahia"
            };
            EmpresasController.GetInstance().AddEmpresa(empresa);

            ctrl = ProjetosController.GetInstance();
        }
        public static (Empresa, Projeto, Funcionario) CreateEmpresaProjetoFuncionario()
        {
            var empresa = new Empresa {
                Nome = "Casas Bahia"
            };

            EmpresasController.GetInstance().AddEmpresa(empresa);

            var projeto = new Projeto {
                Nome = "Empilhadeira"
            };

            ProjetosController.GetInstance().AddProjeto(projeto, empresa.Id);

            var responsavel = new Funcionario {
                Nome = "Bruno"
            };

            FuncionariosController.GetInstance().AddFuncionario(responsavel, empresa.Id);

            return(empresa, projeto, responsavel);
        }