Exemplo n.º 1
0
        public void ProgressColorConverter_Convert_Learned_ReturnGreen()
        {
            ProgressColorConverter converter = new ProgressColorConverter();

            SolidColorBrush result = (SolidColorBrush)converter.Convert(LearningProgress.Learned, typeof(LearningProgress), new Object(), CultureInfo.CurrentCulture);

            Assert.AreEqual(Color.FromRgb(0, 128, 0), result.Color);
        }
Exemplo n.º 2
0
        public void ProgressColorConverter_Convert_InProgress_ReturnYellow()
        {
            ProgressColorConverter converter = new ProgressColorConverter();

            SolidColorBrush result = (SolidColorBrush)converter.Convert(LearningProgress.InProgress, typeof(LearningProgress), new Object(), CultureInfo.CurrentCulture);

            Assert.AreEqual(Color.FromRgb(255, 255, 0), result.Color);
        }
Exemplo n.º 3
0
        public void ProgressColorConverter_ConvertBack_DefaultParameters_ThrowException()
        {
            ProgressColorConverter converter = new ProgressColorConverter();

            converter.ConvertBack(new Object(), typeof(SolidColorBrush), new Object(), CultureInfo.CurrentCulture);
        }