예제 #1
0
        public void TestUriRuntime(string uriString, UriKind uriKind)
        {
            var model = CreateModel();

            var obj = new TypeWithUri {
                Value = new Uri(uriString, uriKind)
            };
            TypeWithUri clone = (TypeWithUri)model.DeepClone(obj);

            Assert.Equal(obj.Value, clone.Value);
        }
예제 #2
0
        public void TestUriRuntime(string uriString, UriKind uriKind, bool windowsOnly = false)
        {
            if (windowsOnly)
            {
                Skip.IfNot(RuntimeInformation.IsOSPlatform(OSPlatform.Windows));
            }
            var model = CreateModel();

            var obj = new TypeWithUri {
                Value = new Uri(uriString, uriKind)
            };
            TypeWithUri clone = (TypeWithUri)model.DeepClone(obj);

            Assert.Equal(obj.Value, clone.Value);
        }