-
-
Save johndowns/746d2430cc3cb210c4a199e7aaed9f64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Collection(nameof(FunctionTestCollection))] | |
public class HelloWorldFunctionTest | |
{ | |
private readonly FunctionTestFixture _fixture; | |
private HttpResponseMessage _response; | |
public HelloWorldFunctionTest(FunctionTestFixture fixture) | |
{ | |
_fixture = fixture; | |
} | |
[Fact] | |
public void Hello_World_Function_Test() | |
{ | |
this.BDDfy(); | |
} | |
private async Task When_The_HelloWorld_Function_Is_Invoked() | |
{ | |
_response = await _fixture.Client.GetAsync("api/HelloWorld?name=James+Bond"); | |
} | |
private async Task Then_The_Response_Should_Include_The_Caller_Name() | |
{ | |
Assert.EndsWith("James Bond", await _response.Content.ReadAsStringAsync()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment