Ejemplo n.º 1
0
        public void ViewModel_InstitutionalAgreements_ManagementForms_InstitutionalAgreementDeriveTitleInput_ShouldBeConstructible()
        {
            var model = new InstitutionalAgreementDeriveTitleInput
            {
                IsTitleDerived = false,
                Type           = "type",
                ParticipantEstablishmentIds = null,
                Status = "status",
                Title  = "title",
            };

            model.ShouldNotBeNull();
            model.IsTitleDerived.ShouldBeFalse();
            model.Title.ShouldNotBeNull();
            model.Type.ShouldNotBeNull();
            model.Status.ShouldNotBeNull();
        }
        public void ViewModel_InstitutionalAgreements_ManagementForms_InstitutionalAgreementDeriveTitleInput_ShouldBeConstructible()
        {
            var model = new InstitutionalAgreementDeriveTitleInput
            {
                IsTitleDerived = false,
                Type = "type",
                ParticipantEstablishmentIds = null,
                Status = "status",
                Title = "title",
            };

            model.ShouldNotBeNull();
            model.IsTitleDerived.ShouldBeFalse();
            model.Title.ShouldNotBeNull();
            model.Type.ShouldNotBeNull();
            model.Status.ShouldNotBeNull();
        }
 public virtual ActionResult DeriveTitle(InstitutionalAgreementDeriveTitleInput model)
 {
     var query = new GenerateTitleQuery(User);
     Mapper.Map(model, query);
     model.Title = _queryProcessor.Execute(query);
     return Json(model, JsonRequestBehavior.AllowGet);
 }