示例#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);
        }
示例#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);
        }