public async void Retornar_Detalhamento_De_Nota()
        {
            // Arrange & Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { }));
            var result = await fixture._clientApi.GetAsync($"api/v1/conselhos-classe/detalhamento/{_id}");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
Exemple #2
0
        public async void Deve_Obter_Sugestao_DataInicio()
        {
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { Permissao.DE_C }));

            string turmaCodigo            = "1";
            long   componenteCurricularId = 1105;
            HttpResponseMessage result    = await fixture._clientApi.GetAsync($"api/v1/devolutivas/turmas/{turmaCodigo}/componentes-curriculares/{componenteCurricularId}/sugestao");

            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async void ObterDresPorAbrangenciaComOpcaoTodas()
        {
            // Arrange
            // Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { }));

            var result = await fixture._clientApi.GetAsync($"api/v1/relatorios/filtros/dres");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async Task Deve_Obter_Carta_Intencoes()
        {
            // Arrange
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { Permissao.CI_C }));

            var turmaCodigo            = "123";
            var componenteCurricularId = 512;

            // Act
            var result = await fixture._clientApi.GetAsync($"api/v1/carta-intencoes/turmas/{turmaCodigo}/componente-curricular/{componenteCurricularId}");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async void Deve_Obter_Anotacao_Aluno()
        {
            // Arrange & Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] {
                Permissao.PDA_I, Permissao.PDA_A, Permissao.PDA_E
            })); // TODO ajustar quando o permissionamento estiver pronto

            var codigoAluno = "123123";
            var aulaId      = 100;
            var result      = await fixture._clientApi.GetAsync($"api/v1/anotacoes/alunos/{codigoAluno}/aulas/{aulaId}");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
Exemple #6
0
        public async void Versionamento_Retornar_Ultima_Versao()
        {
            // Arrange & Act
            var result = await fixture._clientApi.GetAsync("api/v1/recuperacao-paralela/anos-letivos");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async void Versionamento_Retornar_Ultima_Versao()
        {
            // Arrange & Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            var result = await fixture._clientApi.GetAsync("api/v1/versoes/");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
Exemple #8
0
        public async void Deve_Listar_Todos_Objetivos()
        {
            _fixture._clientApi.DefaultRequestHeaders.Clear();
            _fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", _fixture.GerarToken(new Permissao[] { Permissao.PA_C }));

            long ano = 1;
            long componenteCurricularId = 1105;
            HttpResponseMessage result  = await _fixture._clientApi.GetAsync($"api/v1/objetivos-aprendizagem/{ano}/{componenteCurricularId}");

            Assert.True(_fixture.ValidarStatusCodeComSucesso(result));
        }
        public void Deve_Consultar_Quantidade_Notificacao_Nao_Lidas()
        {
            _fixture._clientApi.DefaultRequestHeaders.Clear();

            _fixture._clientApi.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue("Bearer", _fixture.GerarToken(new Permissao[] { Permissao.N_I, Permissao.N_C }));

            var getResult = _fixture._clientApi.GetAsync($"api/v1/notificacoes/nao-lidas").Result;

            Assert.True(_fixture.ValidarStatusCodeComSucesso(getResult));
        }
Exemple #10
0
        public void Deve_Consultar_Dres()
        {
            _fixture._clientApi.DefaultRequestHeaders.Clear();

            _fixture._clientApi.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue("Bearer", _fixture.GerarToken(new Permissao[] { }));

            var postResult = _fixture._clientApi.GetAsync("api/v1/dres").Result;

            Assert.True(_fixture.ValidarStatusCodeComSucesso(postResult));
        }
Exemple #11
0
        public async void Deve_Obter_Diario_De_Bordo()
        {
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { Permissao.DDB_C }));

            string id = "1";
            HttpResponseMessage result = await fixture._clientApi.GetAsync($"api/v1/diarios-bordo/{id}");

            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async void ObterComponenteCurricularePorAnosEModalidade()
        {
            // Arrange
            // Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { }));

            var codigoUe = "094765";
            var result   = await fixture._clientApi.GetAsync($"api/v1/componentes-curriculares/ues/{codigoUe}/modalidades/5/anos/2020/anos-escolares?anosEscolares=1");

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async void Gerar_Relatorio_Historico_Escolar()
        {
            // Arrange
            FiltroHistoricoEscolarDto filtro = new FiltroHistoricoEscolarDto();
            var jsonParaPost = new StringContent(JsonConvert.SerializeObject(filtro), Encoding.UTF8, "application/json");

            // Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { }));
            var result = await fixture._clientApi.PostAsync($"api/v1/historico-escolar/gerar", jsonParaPost);

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
        public async Task Deve_Obter_Datas_Das_Aulas()
        {
            _fixture._clientApi.DefaultRequestHeaders.Clear();

            _fixture._clientApi.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue("Bearer", _fixture.GerarToken(new Permissao[] { Permissao.PDA_C }));

            var turmaCodigo = "2120528";
            var componenteCurricularCodigo = "1105";

            var result = await _fixture._clientApi.GetAsync($"api/v1/calendarios/frequencias/aulas/datas/turmas/{turmaCodigo}/componente/{componenteCurricularCodigo}");

            Assert.True(_fixture.ValidarStatusCodeComSucesso(result));
        }
Exemple #15
0
        public async Task Deve_Retornar_Funcionarios_Por_Filtro()
        {
            // Arrange
            fixture._clientApi.DefaultRequestHeaders.Clear();
            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { Permissao.AS_C }));
            filtro.AtualizaCodigoDre(codigoDRE);
            filtro.AtualizaCodigoUe(codigoUE);
            var jsonFiltro = new StringContent(JsonConvert.SerializeObject(filtro), Encoding.UTF8, "application/json");

            // Act
            var result = await fixture._clientApi.PostAsync($"api/v1/unidades-escolares/funcionarios", jsonFiltro);

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }
Exemple #16
0
        public async void Ciclos_Retornar_Ciclos()
        {
            // Arrange
            List <string> anos = new List <string>();

            for (int ano = 1; ano <= 9; ano++)
            {
                anos.Add(ano.ToString());
            }
            FiltroCicloDto filtroCiclo = new FiltroCicloDto {
                Anos = anos, AnoSelecionado = "1", Modalidade = 5
            };

            // Act
            fixture._clientApi.DefaultRequestHeaders.Clear();
            var jsonParaPost = new StringContent(JsonConvert.SerializeObject(filtroCiclo), Encoding.UTF8, "application/json");

            fixture._clientApi.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", fixture.GerarToken(new Permissao[] { }));
            var result = await fixture._clientApi.PostAsync("api/v1/ciclos/filtro", jsonParaPost);

            // Assert
            Assert.True(fixture.ValidarStatusCodeComSucesso(result));
        }