|
@@ -18,8 +18,8 @@ public class AttributeTests {
|
|
// Assert
|
|
// Assert
|
|
//Assert.False (attribute.Initialized);
|
|
//Assert.False (attribute.Initialized);
|
|
Assert.Equal (-1, attribute.PlatformColor);
|
|
Assert.Equal (-1, attribute.PlatformColor);
|
|
- Assert.Equal ((Color)Color.White, attribute.Foreground);
|
|
|
|
- Assert.Equal ((Color)Color.Black, attribute.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (Color.White), attribute.Foreground);
|
|
|
|
+ Assert.Equal (new Color (Color.Black), attribute.Background);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -32,8 +32,8 @@ public class AttributeTests {
|
|
// Assert
|
|
// Assert
|
|
//Assert.True (attribute.Initialized);
|
|
//Assert.True (attribute.Initialized);
|
|
Assert.Equal (42, attribute.PlatformColor);
|
|
Assert.Equal (42, attribute.PlatformColor);
|
|
- Assert.Equal ((Color)Color.White, attribute.Foreground);
|
|
|
|
- Assert.Equal ((Color)Color.Black, attribute.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (Color.White), attribute.Foreground);
|
|
|
|
+ Assert.Equal (new Color (Color.Black), attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -43,8 +43,8 @@ public class AttributeTests {
|
|
var attribute = new Attribute (ColorName.Blue);
|
|
var attribute = new Attribute (ColorName.Blue);
|
|
|
|
|
|
// Assert
|
|
// Assert
|
|
- Assert.Equal ((Color)Color.Blue, attribute.Foreground);
|
|
|
|
- Assert.Equal ((Color)Color.Blue, attribute.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (Color.Blue), attribute.Foreground);
|
|
|
|
+ Assert.Equal (new Color (Color.Blue), attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
[Fact, AutoInitShutdown]
|
|
[Fact, AutoInitShutdown]
|
|
@@ -70,7 +70,7 @@ public class AttributeTests {
|
|
|
|
|
|
// Assert
|
|
// Assert
|
|
Assert.Equal (foregroundColor, attribute.Foreground);
|
|
Assert.Equal (foregroundColor, attribute.Foreground);
|
|
- Assert.Equal ((Color)backgroundColorName, attribute.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (backgroundColorName), attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -82,7 +82,7 @@ public class AttributeTests {
|
|
var attribute = new Attribute (foregroundColorName, backgroundColor);
|
|
var attribute = new Attribute (foregroundColorName, backgroundColor);
|
|
|
|
|
|
// Assert
|
|
// Assert
|
|
- Assert.Equal ((Color)foregroundColorName, attribute.Foreground);
|
|
|
|
|
|
+ Assert.Equal (new Color (foregroundColorName), attribute.Foreground);
|
|
Assert.Equal (backgroundColor, attribute.Background);
|
|
Assert.Equal (backgroundColor, attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -97,15 +97,15 @@ public class AttributeTests {
|
|
var attr = new Attribute ();
|
|
var attr = new Attribute ();
|
|
|
|
|
|
Assert.Equal (-1, attr.PlatformColor);
|
|
Assert.Equal (-1, attr.PlatformColor);
|
|
- Assert.Equal ((Color)Color.White, attr.Foreground);
|
|
|
|
- Assert.Equal ((Color)Color.Black, attr.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (Color.White), attr.Foreground);
|
|
|
|
+ Assert.Equal (new Color (Color.Black), attr.Background);
|
|
|
|
|
|
// Test foreground, background
|
|
// Test foreground, background
|
|
var fg = new Color ();
|
|
var fg = new Color ();
|
|
- fg = (Color)Color.Red;
|
|
|
|
|
|
+ fg = new Color (Color.Red);
|
|
|
|
|
|
var bg = new Color ();
|
|
var bg = new Color ();
|
|
- bg = (Color)Color.Blue;
|
|
|
|
|
|
+ bg = new Color (Color.Blue);
|
|
|
|
|
|
attr = new Attribute (fg, bg);
|
|
attr = new Attribute (fg, bg);
|
|
|
|
|
|
@@ -156,8 +156,8 @@ public class AttributeTests {
|
|
var attribute = new Attribute (foregroundColorName, backgroundColorName);
|
|
var attribute = new Attribute (foregroundColorName, backgroundColorName);
|
|
|
|
|
|
// Assert
|
|
// Assert
|
|
- Assert.Equal ((Color)foregroundColorName, attribute.Foreground);
|
|
|
|
- Assert.Equal ((Color)backgroundColorName, attribute.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (foregroundColorName), attribute.Foreground);
|
|
|
|
+ Assert.Equal (new Color (backgroundColorName), attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -171,7 +171,7 @@ public class AttributeTests {
|
|
var attribute = new Attribute (foregroundColorName, backgroundColor);
|
|
var attribute = new Attribute (foregroundColorName, backgroundColor);
|
|
|
|
|
|
// Assert
|
|
// Assert
|
|
- Assert.Equal ((Color)foregroundColorName, attribute.Foreground);
|
|
|
|
|
|
+ Assert.Equal (new Color (foregroundColorName), attribute.Foreground);
|
|
Assert.Equal (backgroundColor, attribute.Background);
|
|
Assert.Equal (backgroundColor, attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -187,7 +187,7 @@ public class AttributeTests {
|
|
|
|
|
|
// Assert
|
|
// Assert
|
|
Assert.Equal (foregroundColor, attribute.Foreground);
|
|
Assert.Equal (foregroundColor, attribute.Foreground);
|
|
- Assert.Equal ((Color)backgroundColorName, attribute.Background);
|
|
|
|
|
|
+ Assert.Equal (new Color (backgroundColorName), attribute.Background);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -203,10 +203,10 @@ public class AttributeTests {
|
|
|
|
|
|
var value = 42;
|
|
var value = 42;
|
|
var fg = new Color ();
|
|
var fg = new Color ();
|
|
- fg = (Color)Color.Red;
|
|
|
|
|
|
+ fg = new Color (Color.Red);
|
|
|
|
|
|
var bg = new Color ();
|
|
var bg = new Color ();
|
|
- bg = (Color)Color.Blue;
|
|
|
|
|
|
+ bg = new Color (Color.Blue);
|
|
|
|
|
|
// Test conversion to int
|
|
// Test conversion to int
|
|
attr = new Attribute (value, fg, bg);
|
|
attr = new Attribute (value, fg, bg);
|
|
@@ -223,10 +223,10 @@ public class AttributeTests {
|
|
public void Make_SetsNotInitialized_NoDriver ()
|
|
public void Make_SetsNotInitialized_NoDriver ()
|
|
{
|
|
{
|
|
var fg = new Color ();
|
|
var fg = new Color ();
|
|
- fg = (Color)Color.Red;
|
|
|
|
|
|
+ fg = new Color (Color.Red);
|
|
|
|
|
|
var bg = new Color ();
|
|
var bg = new Color ();
|
|
- bg = (Color)Color.Blue;
|
|
|
|
|
|
+ bg = new Color (Color.Blue);
|
|
|
|
|
|
var a = new Attribute (fg, bg);
|
|
var a = new Attribute (fg, bg);
|
|
|
|
|
|
@@ -241,10 +241,10 @@ public class AttributeTests {
|
|
driver.Init (() => { });
|
|
driver.Init (() => { });
|
|
|
|
|
|
var fg = new Color ();
|
|
var fg = new Color ();
|
|
- fg = (Color)Color.Red;
|
|
|
|
|
|
+ fg = new Color (Color.Red);
|
|
|
|
|
|
var bg = new Color ();
|
|
var bg = new Color ();
|
|
- bg = (Color)Color.Blue;
|
|
|
|
|
|
+ bg = new Color (Color.Blue);
|
|
|
|
|
|
var attr = new Attribute (fg, bg);
|
|
var attr = new Attribute (fg, bg);
|
|
//Assert.True (attr.Initialized);
|
|
//Assert.True (attr.Initialized);
|
|
@@ -260,10 +260,10 @@ public class AttributeTests {
|
|
{
|
|
{
|
|
|
|
|
|
var fg = new Color ();
|
|
var fg = new Color ();
|
|
- fg = (Color)Color.Red;
|
|
|
|
|
|
+ fg = new Color (Color.Red);
|
|
|
|
|
|
var bg = new Color ();
|
|
var bg = new Color ();
|
|
- bg = (Color)Color.Blue;
|
|
|
|
|
|
+ bg = new Color (Color.Blue);
|
|
|
|
|
|
var attr = new Attribute (fg, bg);
|
|
var attr = new Attribute (fg, bg);
|
|
//Assert.False (attr.Initialized);
|
|
//Assert.False (attr.Initialized);
|