jeremydmiller on gh-pages
Documentation Update for 4.0.0 (compare)
jeremydmiller on master
Drop support for NC2.x and add … Fix tests Enable NRTs and 8 more (compare)
jeremydmiller on master
Pick serializer settings proper… (compare)
what I see as benefit as well is that on UT actions as here
[Test]
public async Task SearchOneFondsQueries()
{
await Run(
_ =>
{
var input = new GraphQLRequest
{
Query = @"{ funds(searchQuery: ""Fond de Test Hedge en Duration"") { name } }"
};
_.Post.Json(input).ToUrl("/graphql");
_.StatusCodeShouldBe(HttpStatusCode.OK);
_.GraphQL()
.ShouldBeSuccess(@"{ ""funds"": [
{
""name"": ""Fond de Test Hedge en Duration""
}]}");
});
}
where Scenario
is passed in into the Run
function, I could add extensions method that would allow for me to retrieve a dependency, and configure expectations on it. Because for my test some fake dependencies are registered in within the test startup and initialized with SystemUnderTest.ForStartup<T>(builder =>...
so that way I would have an easy way to retrieve them and set expectations based on test requirements
@jeremydmiller I just started playing around with Alba for some HTTP API integration tests. So far, I like it a lot. One thing that bugs me though is that the built-in assertion on the content type behaves not as I would expect. I have configured my scenario _.ContentTypeShouldBe("application/problem+json")
, which then fails with:
Alba.ScenarioAssertionException : Expected a single header value of 'content-type'='application/problem+json', but the actual value was 'application/problem+json; charset=utf-8'
Of course I can include the charset on the expected value. However, it feels a bit clunky to do so. I could make a contribution to improve this if you like, but I am not sure if this fits in your ideas how the library should develop.