/// <summary> ///A test for SetSource ///</summary> public void SetSourceTestHelper <TProxy, TSource>() where TProxy : ISerializableProxy <TSource>, new() { SerializableProxyList <TProxy, TSource> target = new SerializableProxyList <TProxy, TSource>(); IList <TSource> source = new List <TSource>(); target.SetSource(source); Assert.AreEqual(source, target.AsSource()); }
/// <summary> ///A test for AsSource ///</summary> public void AsSourceTestHelper <TProxy, TSource>() where TProxy : ISerializableProxy <TSource>, new() { SerializableProxyList <TProxy, TSource> target = new SerializableProxyList <TProxy, TSource>(); IList <TSource> expected = new List <TSource>(); expected.Add(new TProxy().AsSource()); IList <TSource> actual; target.SetSource(expected); actual = target.AsSource(); CollectionAssert.AreEqual(expected.ToArray(), actual.ToArray()); }