public void CreateNode_Should_Add_Node_To_Graph_And_Apply_Custom_Configuration() { var graph = MockRepository.GenerateMock<IGraph>(); var expression = new NodeCollectionAddExpression(graph); graph.Expect(x => x.AddNode(null)) .Constraints(Is.Matching<IGraphNode>(x => x.Name == "a")); expression.WithName("a").WithLabel("label"); graph.VerifyAllExpectations(); }
public void CreateNode_Should_Add_Node_To_Graph() { var graph = MockRepository.GenerateMock<IGraph>(); var expression = new NodeCollectionAddExpression(graph); graph.Expect(x => x.AddNode(null)) .Constraints(Is.Matching<IGraphNode>(x => x.Name == "a" && x.Attributes.CurrentAttributes.Count == 0)); expression.WithName("a"); graph.VerifyAllExpectations(); }