Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

C# Unit test IConfiguration

[Fact]
public void Test_IsConfigured_Positive()
{

  // test against this configuration
  IConfiguration config = new ConfigurationBuilder()
    // how to populate it via code
    .Build();

  // the extension method to test
  Assert.True(config.IsConfigured());

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Unit #test #IConfiguration
ADD COMMENT
Topic
Name
8+1 =