GetClientApplicationResponse IClientApplicationsManager.GetClientApplication(IRequest request, GetClientApplication body) { return(new GetClientApplicationResponse { ClientApplication = (ClientApplication)GetClientApplication(body.Id), }); }
public void WhenAllPropertiesValid_ThenSucceeds() { var dto = new GetClientApplication { Id = "avalue", }; validator.ValidateAndThrow(dto); }
/// <summary> /// Provides the Get request for the 'ClientApplications' resource. /// </summary> public GetClientApplicationResponse Get(GetClientApplication body) { return(ProcessRequest(body, HttpStatusCode.OK, () => { var response = this.ClientApplicationsManager.GetClientApplication(this.Request, body); return response; })); }
public void WhenIdIsNull_ThenThrows() { var dto = new GetClientApplication { Id = null, }; Assert.Throws <ValidationException>( FluentValidation <GetClientApplication> .NotEmptyErrorMessage(x => x.Id), () => validator.ValidateAndThrow(dto)); }