コード例 #1
0
        public async Task Deve_Salvar_Periodo_Escolar()
        {
            servicoPeriodoEscolar.Setup(x => x.SalvarPeriodoEscolar(It.IsAny <IEnumerable <PeriodoEscolar> >(), It.IsAny <long>()));

            await comandosPeriodoEscolar.Salvar(new PeriodoEscolarListaDto
            {
                TipoCalendario = 1,
                Periodos       = new List <PeriodoEscolarDto>
                {
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 1,
                        PeriodoInicio = DateTimeExtension.HorarioBrasilia(),
                        PeriodoFim    = DateTimeExtension.HorarioBrasilia().AddMinutes(1),
                    },
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 2,
                        PeriodoInicio = DateTimeExtension.HorarioBrasilia().AddMinutes(2),
                        PeriodoFim    = DateTimeExtension.HorarioBrasilia().AddMinutes(3),
                    },
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 3,
                        PeriodoInicio = DateTimeExtension.HorarioBrasilia().AddMinutes(4),
                        PeriodoFim    = DateTimeExtension.HorarioBrasilia().AddMinutes(5),
                    },
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 4,
                        PeriodoInicio = DateTimeExtension.HorarioBrasilia().AddMinutes(6),
                        PeriodoFim    = DateTimeExtension.HorarioBrasilia().AddMinutes(7),
                    }
                }
            });
        }
コード例 #2
0
        public void Deve_Salvar_Periodo_Escolar()
        {
            servicoPeriodoEscolar.Setup(x => x.SalvarPeriodoEscolar(It.IsAny <IEnumerable <PeriodoEscolar> >(), It.IsAny <long>()));

            comandosPeriodoEscolar.Salvar(new PeriodoEscolarListaDto
            {
                TipoCalendario = 1,
                Periodos       = new List <PeriodoEscolarDto>
                {
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 1,
                        PeriodoInicio = DateTime.Now,
                        PeriodoFim    = DateTime.Now.AddMinutes(1),
                    },
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 2,
                        PeriodoInicio = DateTime.Now.AddMinutes(2),
                        PeriodoFim    = DateTime.Now.AddMinutes(3),
                    },
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 3,
                        PeriodoInicio = DateTime.Now.AddMinutes(4),
                        PeriodoFim    = DateTime.Now.AddMinutes(5),
                    },
                    new PeriodoEscolarDto
                    {
                        Bimestre      = 4,
                        PeriodoInicio = DateTime.Now.AddMinutes(6),
                        PeriodoFim    = DateTime.Now.AddMinutes(7),
                    }
                }
            });
        }