public Result Execute(EntidadSaveCommand command) { Result result = _entidadServiceBusiness.ValidateSave(command.Entidad); result.AddErrorsRange(_domicilioServiceBusiness.ValidateSave(command.Entidad.Sede.Domicilio).GetErrors()); if (result.success) { SaveEntidad(command, ref result); } return(result); }
public void Validate_Entidad_Success() { var entidad = new Entidad() { RazonSocial = "Sala 1", NombreFantasia = "sala A", Cuit = "23-32669254-9" }; //_mockedVisitorEntidadSave.Setup(x => x.AlreadyExistEntidad(It.IsAny<string>())).Returns(false); _entidadServiceBusiness = new EntidadServiceBusiness(_mockedVisitorEntidadSave.Object); _result = _entidadServiceBusiness.ValidateSave(entidad); Assert.AreEqual(true, _result.success); }