Esempio n. 1
0
        public void opEquality_RelativeUri_RelativeUriDiffers()
        {
            var obj       = new RelativeUri("/abc");
            var comparand = new RelativeUri("/xyz");

            Assert.False(obj == comparand);
        }
Esempio n. 2
0
        public void opExplicit_RelativeUri_UriRelative()
        {
            var         expected = new RelativeUri("/");
            RelativeUri actual   = new Uri("/", UriKind.Relative);

            Assert.Equal(expected, actual);
        }
Esempio n. 3
0
        public void prop_Length_getEmpty()
        {
            const int expected = 0;
            var       actual   = new RelativeUri(string.Empty).Length;

            Assert.Equal(expected, actual);
        }
Esempio n. 4
0
        public void opInequality_RelativeUri_RelativeUriDiffers()
        {
            var obj       = new RelativeUri("/abc");
            var comparand = new RelativeUri("/xyz");

            Assert.True(obj != comparand);
        }
Esempio n. 5
0
        public void opImplicit_Uri_RelativeUri()
        {
            var expected = new Uri("/", UriKind.Relative);
            Uri actual   = new RelativeUri(expected);

            Assert.Equal(expected, actual);
        }
Esempio n. 6
0
        public void opImplicit_string_RelativeUri()
        {
            const string expected = "/";
            string       actual   = new RelativeUri(expected);

            Assert.Equal(expected, actual);
        }
Esempio n. 7
0
        public void opImplicit_RelativeUri_stringEmpty()
        {
            var         expected = new RelativeUri(string.Empty);
            RelativeUri actual   = string.Empty;

            Assert.Equal(expected, actual);
        }
Esempio n. 8
0
        public void opImplicit_RelativeUri_string()
        {
            var         expected = new RelativeUri("/");
            RelativeUri actual   = "/";

            Assert.Equal(expected, actual);
        }
Esempio n. 9
0
        public void opEquality_RelativeUri_RelativeUri()
        {
            var obj       = new RelativeUri("/");
            var comparand = new RelativeUri("/");

            Assert.True(obj == comparand);
        }
Esempio n. 10
0
        public void opInequality_RelativeUri_RelativeUriSame()
        {
            var obj       = new RelativeUri("/");
            var comparand = obj;

            Assert.False(obj != comparand);
        }
Esempio n. 11
0
        public void prop_Length_get()
        {
            const int expected = 4;
            var       actual   = new RelativeUri("/234").Length;

            Assert.Equal(expected, actual);
        }
Esempio n. 12
0
        public void op_Equals_objectDiffer()
        {
            var obj       = new RelativeUri("/abc");
            var comparand = new RelativeUri("/xyz");

            Assert.False(obj.Equals(comparand as object));
        }
Esempio n. 13
0
        public void op_Equals_object()
        {
            var obj       = new RelativeUri("/");
            var comparand = new RelativeUri("/");

            Assert.True(obj.Equals(comparand as object));
        }
Esempio n. 14
0
        public void op_CompareTo_object()
        {
            const int expected = 1;
            var       actual   = new RelativeUri("/").CompareTo(null as object);

            Assert.Equal(expected, actual);
        }
Esempio n. 15
0
        public void op_Equals_RelativeUriSame()
        {
            var obj       = new RelativeUri("/");
            var comparand = obj;

            Assert.True(obj.Equals(comparand));
        }
Esempio n. 16
0
        public void op_Equals_RelativeUriUnequal()
        {
            var obj       = new RelativeUri("/abc");
            var comparand = new RelativeUri("/xyz");

            Assert.False(obj.Equals(comparand));
        }
Esempio n. 17
0
        public void opGreaterThan_RelativeUri_RelativeUri()
        {
            var obj       = new RelativeUri("/");
            var comparand = new RelativeUri("/");

            Assert.False(obj > comparand);
        }
Esempio n. 18
0
        public void opGreaterThan_RelativeUriGreater_RelativeUri()
        {
            var obj       = new RelativeUri("/xyz");
            var comparand = new RelativeUri("/abc");

            Assert.True(obj > comparand);
        }
Esempio n. 19
0
        public void op_ToString()
        {
            const string expected = "/";
            var          actual   = new RelativeUri(expected).ToString();

            Assert.Equal(expected, actual);
        }
Esempio n. 20
0
        public void opLesserThan_RelativeUri_RelativeUriLesser()
        {
            var obj       = new RelativeUri("/xyz");
            var comparand = new RelativeUri("/abc");

            Assert.False(obj < comparand);
        }
Esempio n. 21
0
        public void op_CompareTo_objectSame()
        {
            var obj = new RelativeUri("/");

            const int expected = 0;
            var       actual   = obj.CompareTo(obj as object);

            Assert.Equal(expected, actual);
        }
Esempio n. 22
0
        public void op_GetHashCode()
        {
            var obj = new RelativeUri("/");

            var expected = obj.ToString().GetHashCode();
            var actual   = obj.GetHashCode();

            Assert.Equal(expected, actual);
        }
Esempio n. 23
0
        public void op_CompareTo_objectLesser()
        {
            var    obj       = new RelativeUri("/xyz");
            object comparand = new RelativeUri("/abc");

            const int expected = 23;
            var       actual   = obj.CompareTo(comparand);

            Assert.Equal(expected, actual);
        }
Esempio n. 24
0
        public void op_CompareTo_RelativeUriEqual()
        {
            var obj       = new RelativeUri("/");
            var comparand = new RelativeUri("/");

            const int expected = 0;
            var       actual   = obj.CompareTo(comparand);

            Assert.Equal(expected, actual);
        }
Esempio n. 25
0
        public void ctor_SerializationInfo_StreamingContext()
        {
            var         expected = new RelativeUri("/");
            RelativeUri actual;

            using (Stream stream = new MemoryStream())
            {
                var formatter = new BinaryFormatter();
                formatter.Serialize(stream, new RelativeUri("/"));
                stream.Position = 0;
                actual          = (RelativeUri)formatter.Deserialize(stream);
            }

            Assert.Equal(expected, actual);
        }
Esempio n. 26
0
        public void opGreaterThan_RelativeUriNull_RelativeUri()
        {
            var comparand = new RelativeUri("/");

            Assert.False(null > comparand);
        }
Esempio n. 27
0
        public void opGreaterThan_RelativeUri_RelativeUriNull()
        {
            var obj = new RelativeUri("/");

            Assert.True(obj > null);
        }
Esempio n. 28
0
        public void opLesserThan_RelativeUriNull_RelativeUri()
        {
            var comparand = new RelativeUri("/");

            Assert.True(null < comparand);
        }
Esempio n. 29
0
        public void opLesserThan_RelativeUri_RelativeUriNull()
        {
            var obj = new RelativeUri("/");

            Assert.False(obj < null);
        }
Esempio n. 30
0
        public void op_Equals_objectSame()
        {
            var obj = new RelativeUri("/");

            Assert.True(obj.Equals(obj as object));
        }