@@ -84,14 +84,17 @@ public async Task Server_OnAddNodeCommand_ReturnsTextEdit()
8484 // Remember how many nodes we had before making the change
8585 var count = nodeInfo . Nodes . Count ;
8686
87+ var nodeContents = "New Node Contents" ;
88+
8789 var result = await client . ExecuteCommand ( new ExecuteCommandParams < TextDocumentEdit >
8890 {
8991 Command = Commands . AddNode ,
9092 Arguments = new JArray {
9193 filePath ,
9294 new JObject (
9395 new JProperty ( "position" , "100,100" )
94- )
96+ ) ,
97+ nodeContents ,
9598 }
9699 } ) ;
97100
@@ -106,12 +109,15 @@ public async Task Server_OnAddNodeCommand_ReturnsTextEdit()
106109 nodeInfo = await nodesChangedAfterChangingText ;
107110
108111 nodeInfo . Nodes . Should ( ) . HaveCount ( count + 1 , "because we added a node" ) ;
109- nodeInfo . Nodes . Should ( )
112+ var newNode = nodeInfo . Nodes . Should ( )
110113 . Contain ( n => n . UniqueTitle == "Node" ,
111- "because the new node should be called Title" )
112- . Which . Headers . Should ( )
113- . Contain ( h => h . Key == "position" && h . Value == "100,100" ,
114- "because we specified these coordinates when creating the node" ) ;
114+ "because the new node should be called Title" ) . Subject ;
115+
116+ newNode . PreviewText . Should ( ) . Be ( nodeContents ) ;
117+
118+ newNode . Headers . Should ( )
119+ . Contain ( h => h . Key == "position" && h . Value == "100,100" ,
120+ "because we specified these coordinates when creating the node" ) ;
115121 }
116122
117123 [ Fact ]
0 commit comments