public void GetPairs_EmptyProject_GivesSomePairs() { using (new TestProjectWithSessions(0)) { SpongeProject project = SpongeProject.Create("test"); var pairs = CreateModel(project).GetPairs(); Assert.Less(0, pairs.Count()); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Create a new project. /// </summary> /// ------------------------------------------------------------------------------------ private void tsbCreate_Click(object sender, EventArgs e) { Project = SpongeProject.Create(this); if (Project != null) { MruProjects.AddNewPath(Project.FullFilePath); MruProjects.Save(); DialogResult = DialogResult.OK; Close(); } }
public TestProjectWithSessions(int sessionCount) { _testAppFolder = new TemporaryFolder("~~SpongeStatViewModelTestFolder~~"); ReflectionHelper.SetField(typeof(Sponge), "s_mainAppFldr", _testAppFolder.FolderPath); Project = SpongeProject.Create("statVwModelTestPrj"); for (int i = 0; i < sessionCount; i++) { Session session = Project.AddSession(i.ToString()); session.Save(); } }