public void AnonymousUserCannotSubmitValidator() { var validatorDefinition = new ValidatorDefinition("MyClass", ValidatorType.TextRules, "Id EXISTS"); var noLoginDataApiClient = new DataApiClient(ApiSetup.ApiConfiguration) { LoginMethod = LoginMethod.JsonWebToken }; AssertStatusCode( () => noLoginDataApiClient.SubmitValidatorAsync(validatorDefinition).Wait(), HttpStatusCode.Unauthorized); }