public string InserirReserva(Model.Entity.Reserva.Reserva reserva, List <IMes> mes, string chave, string senha)
        {
            var programa = _programa.Fetch(new Programa {
                Codigo = (int)reserva.Programa
            }).FirstOrDefault();
            var fonte = _fonte.Fetch(new Fonte {
                Id = (int)reserva.Fonte
            }).FirstOrDefault();
            var estrutura = _estutura.Fetch(new Estrutura {
                Codigo = (int)reserva.Estrutura
            }).FirstOrDefault();
            var regional = _regional.Fetch(new Regional {
                Id = (int)reserva.Regional
            }).FirstOrDefault();

            return(_prodesp.InserirReserva(chave, senha, reserva, mes, programa, estrutura, fonte, regional));
        }
        public void ConsultaNrTest()
        {
            var reserva = new Model.Entity.Reserva.Reserva
            {
                DataEmissao = DateTime.Now,
                Uo          = "16055",
                Processo    = "processo1",
                Ugo         = "162101",
                Oc          = "00259",
                Observacao  =
                    "asdasdasdasdasdasdasdasdaasdasdasdasdasdasdasdasdassdasdasdasdaasdasdasdasd7;asdasdasdasdasdasdasdasdaasdasdasdasdasdasdasdasdassdasdasdasdaasdasdasdas15;asdasdasdasdasdasdasdasdaasdasdasdasdasdasdasdasdassdasdasdasdaasdasdasdas23",
                NumSiafemSiafisico = "2016NR00012"
            };

            var result = App.SiafemReservaService.ConsultaNr(AppConfig.WsSiafemUser /*AppConfig.WsSiafisicoUser*/, AppConfig.WsPassword, reserva, "16055");

            Assert.IsNotNull(result);
        }
        public void InserirReservaSiafemTest()
        {
            var reserva = new Model.Entity.Reserva.Reserva
            {
                DataEmissao = DateTime.Now,
                Uo          = "16055",
                Processo    = "processo1",
                Ugo         = "162101",
                Observacao  = "obras e demais servicos"
            };

            var mes = App.ReservaMesService.Buscar(new ReservaMes {
                Id = reserva.Codigo
            }).Cast <IMes>().ToList();
            var result = App.SiafemReservaService.InserirReservaSiafem(AppConfig.WsSiafemUser, AppConfig.WsPassword, reserva, mes, "162101");

            Assert.IsNotNull(result);
        }