public void NewProjectsAreAddedToTheTopOfList() { RecentlyUsedProjectList mruList = new RecentlyUsedProjectList(); mruList.Add(@"C:\Foo\Bar.xunit"); mruList.Add(@"C:\Baz\Biff.xunit"); Assert.Equal(@"C:\Baz\Biff.xunit", mruList.First()); }
public void AddedProjectIsInList() { RecentlyUsedProjectList mruList = new RecentlyUsedProjectList(); mruList.Add(@"C:\Foo\Bar.xunit"); string filename = Assert.Single(mruList); Assert.Equal(@"C:\Foo\Bar.xunit", filename); }
public void AddingMoreThanMaximumNumberOfProjectsPushesOldestProjectOffTheList() { RecentlyUsedProjectList mruList = new RecentlyUsedProjectList(1); mruList.Add(@"C:\Foo\Bar.xunit"); mruList.Add(@"C:\Baz\Biff.xunit"); string filename = Assert.Single(mruList); Assert.Equal(@"C:\Baz\Biff.xunit", filename); }
public void ReAddingAlreadyPresentProjectReordersProjectToTopOfList() { RecentlyUsedProjectList mruList = new RecentlyUsedProjectList(); mruList.Add(@"C:\Foo\Bar.xunit"); mruList.Add(@"C:\Baz\Biff.xunit"); mruList.Add(@"C:\Foo\Bar.xunit"); Assert.Equal(2, mruList.Count()); Assert.Equal(@"C:\Foo\Bar.xunit", mruList.First()); }
public override void Before(MethodInfo methodUnderTest) { projects = RecentlyUsedProjectList.LoadProjectList(); RecentlyUsedProjectList.ClearProjectList(); }
public override void After(MethodInfo methodUnderTest) { RecentlyUsedProjectList.SaveProjectList(projects); }