}
}
-#if NET_2_0
public string [] ExposeSupportedAttributes ()
{
return GetSupportedAttributes ();
}
-#endif
public bool Validate ()
{
}
}
+ class TestNullSwitch : Switch {
+ public TestNullSwitch () : base (null, null)
+ {
+ }
+ }
+
[TestFixture]
public class SwitchesTest {
}
[Test]
-#if NET_2_0
[Ignore ("this test depends on 1.x configuration type")]
-#endif
public void NewSwitch ()
{
Assert.AreEqual ("42", tns.TestValue, "#NS:TestValue");
Assert.IsTrue (tns.Validate(), "#NS:Validate");
}
-#if NET_2_0
[Test]
public void GetSupportedAttributes ()
{
BooleanSwitch s = new BooleanSwitch ("test", "", "hoge");
Assert.IsTrue (!s.Enabled);
}
-#endif
+
+ [Test]
+ public void NullSwitchHasEmptyDisplayNameAndDescription ()
+ {
+ var s = new TestNullSwitch ();
+ Assert.IsEmpty (s.DisplayName);
+ Assert.IsEmpty (s.Description);
+ }
}
}
-#endif
\ No newline at end of file
+#endif