using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using KoloryWPF;
using System.Windows.Media;

namespace TestyJednostkowe.Widok
{
    [TestClass]
    public class KonwerteryTesty
    {
        [TestMethod]
        public void ColorToSolidColorBrushTest_Convert()
        {
            ColorToSolidColorBrushConverter konwerter = new ColorToSolidColorBrushConverter();
            Color kolor = Colors.Violet;

            object obiekt = konwerter.Convert(kolor, typeof(SolidColorBrush), null, System.Globalization.CultureInfo.CurrentCulture);
            Assert.IsInstanceOfType(obiekt, typeof(SolidColorBrush));
            
            SolidColorBrush pędzel = (SolidColorBrush)obiekt;            
            //Assert.AreEqual(Brushes.Violet, pędzel);
            Assert.AreEqual(kolor, pędzel.Color);            
        }

        [TestMethod]
        [ExpectedException(typeof(NotImplementedException))]
        public void ColorToSolidColorBrushTest_ConvertBack()
        {
            ColorToSolidColorBrushConverter konwerter = new ColorToSolidColorBrushConverter();
            object obiekt = konwerter.ConvertBack(null, null, null, null);
        }
    }
}
