Esempio n. 1
0
        public void Convert_NonInkData_ReturnsDPValueUnset()
        {
            var converter = new InkDataToStrokeConverter();

            var actualStrokeContainer = converter.Convert(true, typeof(bool), null, string.Empty);

            Assert.AreEqual(DependencyProperty.UnsetValue, actualStrokeContainer);
        }
Esempio n. 2
0
        public void Convert_NonAssignableTargetType_ReturnsDPValueUnset()
        {
            var mockIInkData = new Mock <IInkData>();
            var inkData      = mockIInkData.Object;
            var converter    = new InkDataToStrokeConverter();

            var actualStrokeContainer = converter.Convert(inkData, typeof(bool), null, string.Empty);

            Assert.AreEqual(DependencyProperty.UnsetValue, actualStrokeContainer);
        }
Esempio n. 3
0
        public void Convert_InkData_ReturnsInkDataStrokeContainer()
        {
            var expectedStrokeContainer = new InkStrokeContainer();

            var mockIInkData = new Mock <IInkData>();

            mockIInkData.Setup(x => x.StrokeContainer).Returns(expectedStrokeContainer);
            var inkData   = mockIInkData.Object;
            var converter = new InkDataToStrokeConverter();

            var actualStrokeContainer = converter.Convert(inkData, typeof(InkStrokeContainer), null, string.Empty);

            Assert.AreEqual(expectedStrokeContainer, actualStrokeContainer);
        }