private void TestSolidColorBrush(Brush brush, Color? expectedColor)
{
if (expectedColor.HasValue) {
Assert.IsInstanceOfType(brush, typeof(SolidColorBrush));
var solidColorBrush = (SolidColorBrush)brush;
Assert.AreEqual(expectedColor.Value, solidColorBrush.Color);
} else {
if (brush != null) {
Assert.AreEqual(Brushes.Transparent, brush);
}
}
}