public void TestEnabledNodes()
        {
            var shouldBeEnabled    = new ValidEnabledStatePropertyNode();
            var shouldNotBeEnabled = new DisabledStatePropertyNode();

            NodeCollection initializedNodes = Node.InitializedNodes;
            NodeCollection enabledNodes     = this.nodeSupervisor.FilterEnabledNodes(initializedNodes);

            CollectionAssert.Contains(enabledNodes, shouldBeEnabled);
            CollectionAssert.DoesNotContain(enabledNodes, shouldNotBeEnabled);
        }
Ejemplo n.º 2
0
        public void TestStatePropertyAttributeNotEnabled()
        {
            try
            {
                var dummy = new DisabledStatePropertyNode();
            }
            catch (ArgumentException e)
            {
                Assert.Fail($"Expected no ArgumentException but got: {e.Message}.");
            }
            catch (Exception e)
            {
                Assert.Fail($"Expected no Exception but got: {e.Message}.");
            }

            Assert.Pass();
        }