public async Task reject_invalid_grant_type() { var server = new TestServerBuilder() .WithSuccessAuthentication() .Build(); var response = await server.CreateClient().PostAsync("/token", GrantTypes.AnInvalidGrantType()); var content = await response.Content.ReadAsStringAsync(); content.Should().Be(ServerMessages.InvalidGrantType); response.StatusCode.Should().Be(StatusCodes.Status400BadRequest); }