// (C) 2003 Martin Willemoes Hansen
//
+#if !MOBILE && !MONOMAC
+
using NUnit.Framework;
using System;
using System.Text;
}
}
-#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 ();
+ AssertHelper.IsEmpty (s.DisplayName);
+ AssertHelper.IsEmpty (s.Description);
+ }
}
}
+#endif