public void TestSaveToFile() { FlowDiagram fl = new FlowDiagram(); fl.AddComponent(new Point(1, 1), ComponentType.Pump); Component c = fl.Components[0]; fl.ChangeCapacity(c, 25); fl.ChangeCurrentFlow(c, 20); fl.AddComponent(new Point(1, 1), ComponentType.Sink); Component c2 = fl.Components[1]; fl.Connect(c2, c, null, null); string pathNew = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + "\\test.bin"; fl.SaveToFile(pathNew); Assert.IsTrue(File.Exists(pathNew)); }