public void mark_as_last_accessed_when_the_project_is_already_the_most_recent_project() { var token = new ProjectToken { Filename = "project4.xml", Name = "project4" }; var history = new ProjectHistory(); history.Store(token); history.Store(new ProjectToken { Filename = "project1.xml", Name = "project1" }); history.Store(new ProjectToken { Filename = "project2.xml", Name = "project2" }); history.Store(new ProjectToken { Filename = "project3.xml", Name = "project3" }); history.MarkAsLastAccessed(token); }
public void mark_as_last_accessed_when_the_project_is_not_the_most_recent_project() { var token = new ProjectToken { Filename = "project4.xml", Name = "project4" }; var history = new ProjectHistory(); history.Store(new ProjectToken { Filename = "project1.xml", Name = "project1" }); history.Store(new ProjectToken { Filename = "project2.xml", Name = "project2" }); history.Store(new ProjectToken { Filename = "project3.xml", Name = "project3" }); history.Store(token); history.MarkAsLastAccessed(token); history.LastAccessed.ShouldBeTheSameAs(token); history.Projects.Length.ShouldEqual(4); }
public void mark_as_last_accessed_from_empty() { var token = new ProjectToken { Filename = "project4.xml", Name = "project4" }; var history = new ProjectHistory(); history.MarkAsLastAccessed(token); history.Projects.Length.ShouldEqual(1); history.LastAccessed.ShouldBeTheSameAs(token); }