Beispiel #1
0
        public void ConvertFailsFor(string name)
        {
            var converter = new InputTypeCollectionConverter();
            var exception = Assert.Throws <InvalidOperationException>(() => converter.ConvertFrom(name));

            Assert.AreEqual("Did not find a match for for Visual3D", exception.Message);
        }
Beispiel #2
0
        public void ConvertHappyPath(HappyPathData data)
        {
            var converter = new InputTypeCollectionConverter();
            var actual    = (InputTypeCollection)converter.ConvertFrom(data.Text);

            CollectionAssert.AreEqual(data.Expected, actual);
        }
Beispiel #3
0
        public static void ConvertHappyPath(string text, Type[] expected)
        {
            var converter = new InputTypeCollectionConverter();
            var actual    = (InputTypeCollection)converter.ConvertFrom(text);

            CollectionAssert.AreEqual(expected, actual);
        }
Beispiel #4
0
        public void CanConvertFrom(Type type)
        {
            var converter = new InputTypeCollectionConverter();

            Assert.AreEqual(true, converter.CanConvertFrom(null, type));
        }
 public void CanConvertFrom(Type type)
 {
     var converter = new InputTypeCollectionConverter();
     Assert.AreEqual(true, converter.CanConvertFrom(null, type));
 }
 public void ConvertFailsFor(string name)
 {
     var converter = new InputTypeCollectionConverter();
     var exception = Assert.Throws<InvalidOperationException>(()=> converter.ConvertFrom(name));
     Assert.AreEqual("Did not find a match for for Visual3D", exception.Message);
 }
 public void ConvertHappyPath(HappyPathData data)
 {
     var converter = new InputTypeCollectionConverter();
     var actual = (InputTypeCollection)converter.ConvertFrom(data.Text);
     CollectionAssert.AreEqual(data.Expected, actual);
 }