public async Task Get_ReturnsExpectedFeature() { var client = factory.CreateClient(); await client.GetAsync("/"); // Invoke Initialize of IFeatureProvider var testFeature = new TestFeature { Value = true }; await TestStartup.Options.Provider.Set(testFeature); var response = await client.GetAsync( $"{TestStartup.Options.ApiGetPath}?feature={testFeature.GetType().Name}"); response.EnsureSuccessStatusCode(); var feature = await response.Content.ReadAsJson <TestFeature>(); Assert.True(feature.Value); }
public void TestFeature_has_correct_name() { var feature = new TestFeature(); Assert.Equal("TestFeature", feature.Name); }
public void TestFeature_has_correct_description() { var feature = new TestFeature(); Assert.Equal("Test feature description.", feature.Description); }