public AtendimentoDtoBuilder()
        {
            var estabelecimentoDtoBuilder = new EstabelecimentoDtoBuilder().ComBarbearia().Build();
            var usuarioDtoBuilder         = new UsuarioDtoBuilder().ComCliente1().Build();
            var atendimentoItemDtoBuilder = new AtendimentoItemDtoBuilder().Build();

            AtendimentoId   = Interlocked.Increment(ref nextId);
            DataAtendimento = DateTime.Now.Day + "/" + DateTime.Now.Month.ToString().PadLeft(2, '0') + "/" + DateTime.Now.Year + " 10:00";
            Valor           = 30;
            Desconto        = 0;
            ValorTotal      = 30;

            UserId      = usuarioDtoBuilder.Id;
            UsuarioNome = usuarioDtoBuilder.Nome;

            EstabelecimentoId   = estabelecimentoDtoBuilder.EstabelecimentoId;
            EstabelecimentoNome = estabelecimentoDtoBuilder.Nome;
            AtendimentoItens.Add(atendimentoItemDtoBuilder);
        }
Beispiel #2
0
        public AgendamentoDtoBuilder()
        {
            var servicoBuilder            = new ServicoBuilder().ComCorte().Build();
            var estabelecimentoDtoBuilder = new EstabelecimentoDtoBuilder().ComBarbearia().Build();
            var usuarioDtoBuilder         = new UsuarioDtoBuilder().ComCliente1().Build();

            AgendamentoId           = Interlocked.Increment(ref nextId);
            DataAgendamento         = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 10, 0, 0);
            DataFinalAgendamento    = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 11, 0, 0);
            DataAgendamentoStr      = DateTime.Now.Day + "/" + DateTime.Now.Month.ToString().PadLeft(2, '0') + "/" + DateTime.Now.Year + " 10:00";
            DataFinalAgendamentoStr = DateTime.Now.Day + "/" + DateTime.Now.Month.ToString().PadLeft(2, '0') + "/" + DateTime.Now.Year + " 11:00";

            ServicoId    = servicoBuilder.ServicoId;
            ServicoNome  = servicoBuilder.Nome;
            ServicoValor = servicoBuilder.Valor;

            UserId      = usuarioDtoBuilder.Id;
            UsuarioNome = usuarioDtoBuilder.Nome;

            Situacao = ESituacao.ATIVO.GetDescription();

            EstabelecimentoId   = estabelecimentoDtoBuilder.EstabelecimentoId;
            EstabelecimentoNome = estabelecimentoDtoBuilder.Nome;
        }