private void TestDeepEquals(MediaUrl objectA, MediaUrl objectB, bool expect, bool expectDeep) { Assert.AreEqual(expectDeep, objectA.DeepEquals(objectB)); Assert.AreEqual(expectDeep, objectB.DeepEquals(objectA)); Assert.AreEqual(expect, objectA.Equals(objectB)); Assert.AreEqual(expect, objectB.Equals(objectA)); }
public void TestMediaUrlConstructor_01() { MediaUrl mediaUrl = new MediaUrl(); mediaUrl.Url = "url 1"; MediaUrl mediaUrl2 = new MediaUrl( "url 1"); Assert.IsTrue(mediaUrl.DeepEquals(mediaUrl2)); mediaUrl = new MediaUrl(); mediaUrl.Url = "url 1"; mediaUrl.Width = "width 1"; mediaUrl.Height = "height 1"; mediaUrl.Duration = "duration 1"; mediaUrl.MimeType = "mimeType 1"; mediaUrl.Type = "type 1"; mediaUrl2 = new MediaUrl("url 1", "width 1", "height 1", "duration 1", "mimeType 1", "type 1"); Assert.IsTrue(mediaUrl.DeepEquals(mediaUrl2)); }
public void TestMediaUrlDeserialize_01() { MediaUrl mediaUrl = new MediaUrl("url 1", "width 1", "height 1", "duration 1", "mimeType 1", "type 1"); string str = XmlHelper.Instance.ToXmlString<MediaUrl>(mediaUrl); MediaUrl des = XmlHelper.Instance.FromXmlString<MediaUrl>(str); Assert.IsTrue(mediaUrl.DeepEquals(des)); }