public void Items() { var collection = new[] { "a", "b" }; var debugView = new CollectionDebugView<string>(collection); Assert.That(debugView.Items, Is.EqualTo(collection)); }
public void Test_Items() { var expected = GetRandomArray.OfDoubles(5, 20); var sut = new CollectionDebugView<double>(expected); Assert.AreEqual(expected, sut.Items, "Arrays should match, but do not."); }
public void Test_Constructor_NullParameter() { object temp = null; Assert.Throws<ArgumentNullException>(() => temp = new CollectionDebugView<double>(null)); var sut = temp as CollectionDebugView<double>; Assert.IsNull(sut, "Object should be null."); }
public void Test_Constructor_WithParameter() { var doubles = GetRandomArray.OfDoubles(5, 20); object temp = null; Assert.DoesNotThrow(()=>temp = new CollectionDebugView<double>(doubles)); var sut = temp as CollectionDebugView<double>; Assert.IsNotNull(sut, "Cannot cast to the expected type."); }
public void ConstructorShouldSetItemsProperty() { // arrange var expected = new List<object>() { new object() }; var target = new CollectionDebugView<object>( expected ); // act var actual = target.Items; // assert Assert.True( actual.SequenceEqual( expected ) ); }