public void Insert_should_throw_ArgumentException_if_passed_an_interface() { // Arrange var initializerType = typeof(IInitializer); var initializerTypeList = new InitializerTypeList { typeof (InitializerDummy), typeof (InitializerDummy), typeof (InitializerDummy) }; // Act & Assert Assert.Throws<ArgumentException>( () => initializerTypeList.Insert(1, initializerType)); }
public void Insert_should_add_initializer_to_collection() { // Arrange var initializerType = typeof(InitializerStub); var initializerTypeList = new InitializerTypeList { typeof (InitializerDummy), typeof (InitializerDummy), typeof (InitializerDummy) }; // Act initializerTypeList.Insert(1, initializerType); // Assert initializerTypeList.Count.ShouldEqual(4); initializerTypeList[1].ShouldEqual(initializerType); }