public void Options_FieldTest() { var testOptions = new TestableOptions <SimpleTestOptions>(new SimpleTestOptions(testString)); Assert.IsNotNull(testOptions.Value.TestField); Assert.IsNull(testOptions["TestField"]); }
public void Options_SimpleTest() { var testOptions = new TestableOptions <SimpleTestOptions>(new SimpleTestOptions(testString)); Assert.IsNotNull(testOptions.Value.TestProperty); Assert.AreEqual(testString, testOptions.Value.TestProperty); }
public void Options_NullValueTest() { var testOptions = new TestableOptions <NullValueTestOptions>(new NullValueTestOptions()); Assert.IsNull(testOptions.Value.Test); Assert.IsNull(testOptions["test"]); }
public void Options_GetPropertyWithCasingTest() { var testOptions = new TestableOptions <SimpleTestOptions>(new SimpleTestOptions(testString)); Assert.AreEqual(testString, testOptions["TestProperty"]); Assert.AreEqual(testString, testOptions["testproperty"]); Assert.AreEqual(testString, testOptions["TeStPrOpErTy"]); }
public void Options_TypeTest() { var testOptions = new TestableOptions <TypeTestOptions>(new TypeTestOptions()); Assert.IsNotNull(testOptions); Assert.IsInstanceOfType(testOptions, typeof(IOptions <TypeTestOptions>)); Assert.IsNotNull(testOptions.Value); Assert.IsInstanceOfType(testOptions.Value, typeof(TypeTestOptions)); }
public void Options_UnknownPropertyTest() { var testOptions = new TestableOptions <SimpleTestOptions>(new SimpleTestOptions(testString)); Assert.IsNull(testOptions["UnknownProperty"]); }