public void Cancel_ShouldCancelGraph() { var graph = new CalculatorGraph(validConfigText); Assert.True(graph.StartRun().ok); graph.Cancel(); Assert.AreEqual(graph.WaitUntilDone().code, Status.StatusCode.Cancelled); }
public void Cancel_ShouldCancelGraph() { using (var graph = new CalculatorGraph(_ValidConfigText)) { Assert.True(graph.StartRun().Ok()); graph.Cancel(); Assert.AreEqual(Status.StatusCode.Cancelled, graph.WaitUntilDone().Code()); } }