Exemplo n.º 1
0
      public void Property_SetNewValue_RaisesFilterChangedEvent()
      {
         Boolean filterChangedEventRaised = false;
         NodePropertyFilter filter = new NodePropertyFilter();
         filter.FilterChanged += (sender, args) => filterChangedEventRaised = true;

         filter.Property = BooleanNodeProperty.BoxMode;

         Assert.IsTrue(filterChangedEventRaised);
      }
Exemplo n.º 2
0
      public void ShowNode_GetNodePropertyReturningFalse_ReturnsFalse()
      {
         NodePropertyFilter filter = new NodePropertyFilter(BooleanNodeProperty.BoxMode);
         Mock<IMaxNode> node = new Mock<IMaxNode>();
         node.Setup(n => n.GetNodeProperty(BooleanNodeProperty.BoxMode)).Returns(false);

         Boolean result = filter.ShowNode(node.Object);

         Assert.IsFalse(result);
         node.Verify(n => n.GetNodeProperty(BooleanNodeProperty.BoxMode), Times.Once);
      }