コード例 #1
0
        public void DragDropCompleted_WhenSameControls_CallsBase()
        {
            //Arrange
            var behavior = new CustomGroupListBoxDragDropBehavior();
            var stateMock = Mock.Create<DragDropState>();
            Mock.Arrange(() => stateMock.IsSameControl).Returns(true);

            //Act
            behavior.DragDropCompleted(stateMock);
        }
コード例 #2
0
        public void Drop_WhenStateIsNull_ThrowsException()
        {
            //Arrange
            var behavior = new CustomGroupListBoxDragDropBehavior();

            //Act
            behavior.Drop(null);
        }
コード例 #3
0
        public void Drop_WhenStatesDraggedItemsIsNull_ThrowsException()
        {
            //Arrange
            var behavior = new CustomGroupListBoxDragDropBehavior();
            var stateMock = Mock.Create<DragDropState>();
            Mock.Arrange(() => stateMock.DraggedItems).Returns((IEnumerable) null);

            //Act
            behavior.Drop(stateMock);
        }       
コード例 #4
0
 public void PropertiesTest()
 {
     var behavior = new CustomGroupListBoxDragDropBehavior();
     TestsHelper.TestPublicPropertiesGetSet(behavior);
 }