protected void SimulateCounterExample(CounterExample counterExample, Action<Simulator> action) { // Test directly action(new Simulator(counterExample)); // Test persisted using (var file = new TemporaryFile(".ssharp")) { counterExample.Save(file.FilePath); action(new Simulator(CounterExample.Load(file.FilePath))); } }