예제 #1
0
        public void DefaultConstructor_ExpectedValues()
        {
            // Call
            var converter = new SelectedVertexLineWidthConverter();

            // Assert
            Assert.IsInstanceOf <IValueConverter>(converter);
        }
예제 #2
0
        public void ConvertBack_ThrowNotSupportedException()
        {
            // Setup
            var converter = new SelectedVertexLineWidthConverter();

            // Call
            TestDelegate call = () => converter.ConvertBack(string.Empty, typeof(int), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.Throws <NotSupportedException>(call);
        }
예제 #3
0
        public void Convert_IntValue_ReturnIntValue()
        {
            // Setup
            var converter = new SelectedVertexLineWidthConverter();

            // Call
            var convertedValue = (int)converter.Convert(2, typeof(int), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.AreEqual(3, convertedValue);
        }
예제 #4
0
        public void Convert_ValueNull_ReturnNull()
        {
            // Setup
            var converter = new SelectedVertexLineWidthConverter();

            // Call
            object convertedValue = converter.Convert(null, typeof(int), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.IsNull(convertedValue);
        }