[TestFixture]
[SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
- public class ColorConverterFixture
- {
+ public class ColorConverterTest {
+
Color col;
Color colnamed;
ColorConverter colconv;
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void CanConvertFrom () {
Assert.IsTrue (colconv.CanConvertFrom (typeof (String)), "CCF#1");
Assert.IsTrue (colconv.CanConvertFrom (null, typeof (String)), "CCF#1a");
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFrom ()
{
Color color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture,
Assert.AreEqual (Color.Empty, colconv.ConvertFrom (" "), "CF#4");
Assert.AreEqual (Color.Red, colconv.ConvertFrom ("Red"), "CF#5");
Assert.AreEqual (Color.Red, colconv.ConvertFrom (" Red "), "CF#6");
- }
- [Test]
- [NUnit.Framework.Category ("NotWorking")]
- public void ConvertFrom_NotWorking ()
- {
- Color color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture,
+ color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture,
"0x123");
Assert.AreEqual (0, color.A, "CF8#1");
Assert.AreEqual (0, color.R, "CF8#2");
[Test]
[ExpectedException (typeof (Exception))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFrom_x4 ()
{
colconv.ConvertFrom (null, CultureInfo.InvariantCulture,
colconv.ConvertFrom (null, CultureInfo.InvariantCulture, 0x10);
}
+ [Test]
+ public void ConvertFrom_CultureNull ()
+ {
+ Color color = (Color) colconv.ConvertFrom (null, null, "#0x23190A44");
+ Assert.AreEqual (35, color.A, "A");
+ Assert.AreEqual (25, color.R, "R");
+ Assert.AreEqual (10, color.G, "G");
+ Assert.AreEqual (68, color.B, "B");
+ }
+
[Test]
public void ConvertTo ()
{
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_InvalidNumber ()
{
try {
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_InvalidNumber ()
{
try {