public virtual void ValueEquals_Basics() { mMedia1.Language = "da"; mMedia2.Language = "en"; mMedia3.Language = mMedia1.Language; IValueEquatableBasicTestUtils.ValueEquals_BasicTests <Media>(mMedia1, mMedia2, mMedia3); }
public virtual void ValueEquals_Basics() { MemoryStream memStmA = StreamUtils.GetRandomMemoryStream(95567); MemoryStream memStmB = StreamUtils.GetRandomMemoryStream(23479); Stream outStm1 = mDataProvider1.OpenOutputStream(); try { StreamUtils.CopyData(memStmA, outStm1); memStmA.Seek(0, SeekOrigin.Begin); } finally { outStm1.Close(); } Stream outStm2 = mDataProvider2.OpenOutputStream(); try { StreamUtils.CopyData(memStmB, outStm2); memStmB.Seek(0, SeekOrigin.Begin); } finally { outStm2.Close(); } Stream outStm3 = mDataProvider3.OpenOutputStream(); try { StreamUtils.CopyData(memStmA, outStm3); memStmA.Seek(0, SeekOrigin.Begin); } finally { outStm3.Close(); } Assert.IsTrue( mDataProvider1.ValueEquals(mDataProvider3), "Two IDataProviders with the same data and no MIME type must be value equal"); Assert.IsFalse( mDataProvider1.ValueEquals(mDataProvider2), "IDataProviders containing different data cannot be value equal"); IValueEquatableBasicTestUtils.ValueEquals_BasicTests <DataProvider>(mDataProvider1, mDataProvider2, mDataProvider3); }