public void the_remove_method_puts_a_node_removed_event_on_the_chain() { var chain = new BehaviorChain(); chain.AddToEnd(new SimpleNode()); var nodeToBeRemoved = new SimpleNode(); chain.AddToEnd(nodeToBeRemoved); chain.AddToEnd(new SimpleNode()); chain.AddToEnd(new SimpleNode()); nodeToBeRemoved.Remove(); chain.As <ITracedModel>().StagedEvents.Last() .ShouldEqual(new NodeRemoved(nodeToBeRemoved)); }
public void the_remove_method_puts_a_node_removed_event_on_the_chain() { var chain = new BehaviorChain(); chain.AddToEnd(new SimpleNode()); var nodeToBeRemoved = new SimpleNode(); chain.AddToEnd(nodeToBeRemoved); chain.AddToEnd(new SimpleNode()); chain.AddToEnd(new SimpleNode()); nodeToBeRemoved.Remove(); chain.As<ITracedModel>().StagedEvents.Last() .ShouldEqual(new NodeRemoved(nodeToBeRemoved)); }