public void opEquality_RelativeUri_RelativeUriDiffers() { var obj = new RelativeUri("/abc"); var comparand = new RelativeUri("/xyz"); Assert.False(obj == comparand); }
public void opExplicit_RelativeUri_UriRelative() { var expected = new RelativeUri("/"); RelativeUri actual = new Uri("/", UriKind.Relative); Assert.Equal(expected, actual); }
public void prop_Length_getEmpty() { const int expected = 0; var actual = new RelativeUri(string.Empty).Length; Assert.Equal(expected, actual); }
public void opInequality_RelativeUri_RelativeUriDiffers() { var obj = new RelativeUri("/abc"); var comparand = new RelativeUri("/xyz"); Assert.True(obj != comparand); }
public void opImplicit_Uri_RelativeUri() { var expected = new Uri("/", UriKind.Relative); Uri actual = new RelativeUri(expected); Assert.Equal(expected, actual); }
public void opImplicit_string_RelativeUri() { const string expected = "/"; string actual = new RelativeUri(expected); Assert.Equal(expected, actual); }
public void opImplicit_RelativeUri_stringEmpty() { var expected = new RelativeUri(string.Empty); RelativeUri actual = string.Empty; Assert.Equal(expected, actual); }
public void opImplicit_RelativeUri_string() { var expected = new RelativeUri("/"); RelativeUri actual = "/"; Assert.Equal(expected, actual); }
public void opEquality_RelativeUri_RelativeUri() { var obj = new RelativeUri("/"); var comparand = new RelativeUri("/"); Assert.True(obj == comparand); }
public void opInequality_RelativeUri_RelativeUriSame() { var obj = new RelativeUri("/"); var comparand = obj; Assert.False(obj != comparand); }
public void prop_Length_get() { const int expected = 4; var actual = new RelativeUri("/234").Length; Assert.Equal(expected, actual); }
public void op_Equals_objectDiffer() { var obj = new RelativeUri("/abc"); var comparand = new RelativeUri("/xyz"); Assert.False(obj.Equals(comparand as object)); }
public void op_Equals_object() { var obj = new RelativeUri("/"); var comparand = new RelativeUri("/"); Assert.True(obj.Equals(comparand as object)); }
public void op_CompareTo_object() { const int expected = 1; var actual = new RelativeUri("/").CompareTo(null as object); Assert.Equal(expected, actual); }
public void op_Equals_RelativeUriSame() { var obj = new RelativeUri("/"); var comparand = obj; Assert.True(obj.Equals(comparand)); }
public void op_Equals_RelativeUriUnequal() { var obj = new RelativeUri("/abc"); var comparand = new RelativeUri("/xyz"); Assert.False(obj.Equals(comparand)); }
public void opGreaterThan_RelativeUri_RelativeUri() { var obj = new RelativeUri("/"); var comparand = new RelativeUri("/"); Assert.False(obj > comparand); }
public void opGreaterThan_RelativeUriGreater_RelativeUri() { var obj = new RelativeUri("/xyz"); var comparand = new RelativeUri("/abc"); Assert.True(obj > comparand); }
public void op_ToString() { const string expected = "/"; var actual = new RelativeUri(expected).ToString(); Assert.Equal(expected, actual); }
public void opLesserThan_RelativeUri_RelativeUriLesser() { var obj = new RelativeUri("/xyz"); var comparand = new RelativeUri("/abc"); Assert.False(obj < comparand); }
public void op_CompareTo_objectSame() { var obj = new RelativeUri("/"); const int expected = 0; var actual = obj.CompareTo(obj as object); Assert.Equal(expected, actual); }
public void op_GetHashCode() { var obj = new RelativeUri("/"); var expected = obj.ToString().GetHashCode(); var actual = obj.GetHashCode(); Assert.Equal(expected, actual); }
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); }
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); }
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); }
public void opGreaterThan_RelativeUriNull_RelativeUri() { var comparand = new RelativeUri("/"); Assert.False(null > comparand); }
public void opGreaterThan_RelativeUri_RelativeUriNull() { var obj = new RelativeUri("/"); Assert.True(obj > null); }
public void opLesserThan_RelativeUriNull_RelativeUri() { var comparand = new RelativeUri("/"); Assert.True(null < comparand); }
public void opLesserThan_RelativeUri_RelativeUriNull() { var obj = new RelativeUri("/"); Assert.False(obj < null); }
public void op_Equals_objectSame() { var obj = new RelativeUri("/"); Assert.True(obj.Equals(obj as object)); }