public void Convert()
        {
            var converter = new DatasetCreatorToOpacityConverter();

            var systemValue = (double)converter.Convert(DatasetCreator.System, typeof(double), null, null);
            Assert.AreEqual(0.65, systemValue);

            var userValue = (double)converter.Convert(DatasetCreator.User, typeof(double), null, null);
            Assert.AreEqual(1.0, userValue);
        }
        public void Convert()
        {
            var converter = new DatasetCreatorToOpacityConverter();

            var systemValue = (double)converter.Convert(DatasetCreator.System, typeof(double), null, null);

            Assert.AreEqual(0.65, systemValue);

            var userValue = (double)converter.Convert(DatasetCreator.User, typeof(double), null, null);

            Assert.AreEqual(1.0, userValue);
        }
 public void ConvertWithIncorrectValueType()
 {
     var converter = new DatasetCreatorToOpacityConverter();
     Assert.Throws<InvalidOperationException>(() => converter.Convert(new object(), typeof(double), null, null));
 }
 public void ConvertWithIncorrectTargetType()
 {
     var converter = new DatasetCreatorToOpacityConverter();
     Assert.Throws<InvalidOperationException>(() => converter.Convert(DatasetCreator.System, typeof(string), null, null));
 }
        public void ConvertWithIncorrectValue()
        {
            var converter = new DatasetCreatorToOpacityConverter();

            Assert.Throws <InvalidOperationException>(() => converter.Convert(DatasetCreator.None, typeof(double), null, null));
        }
        public void ConvertWithIncorrectTargetType()
        {
            var converter = new DatasetCreatorToOpacityConverter();

            Assert.Throws <InvalidOperationException>(() => converter.Convert(DatasetCreator.System, typeof(string), null, null));
        }