public void the_replace_method_puts_a_node_replaced_event_on_the_chain() { var original = new SimpleNode(); var newNode = new SimpleNode(); var chain = new BehaviorChain(); chain.AddToEnd(original); original.ReplaceWith(newNode); chain.As <ITracedModel>().StagedEvents.Last() .ShouldEqual(new NodeReplaced(original, newNode)); }
public void the_replace_method_puts_a_node_replaced_event_on_the_chain() { var original = new SimpleNode(); var newNode = new SimpleNode(); var chain = new BehaviorChain(); chain.AddToEnd(original); original.ReplaceWith(newNode); chain.As<ITracedModel>().StagedEvents.Last() .ShouldEqual(new NodeReplaced(original, newNode)); }