Created
December 30, 2019 15:17
-
-
Save gnschenker/42faed181689bfbd227c6262b9ac642d to your computer and use it in GitHub Desktop.
First integration test with base class
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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using api; | |
using Xunit; | |
namespace tests | |
{ | |
public class GlossaryControllerTests : ControllerTestsBase | |
{ | |
public GlossaryControllerTests(WebApiTesterFactory factory): base(factory) | |
{} | |
[Fact] | |
public async Task should_return_list_of_glossary_items_without_need_for_token() | |
{ | |
var response = await client.GetAsync("glossary"); | |
var json = await response.Content.ReadAsStringAsync(); | |
var data = JsonConvert.DeserializeObject<IEnumerable<GlossaryItem>>(json); | |
Assert.True(data.Count() > 0); | |
Assert.Equal("AccessToken", data.First().Term); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment