private void BrowseMode(string browseType) { string[] browseAttributes; switch (browseType) { case "Creator": browseAttributes = DublinCoreReader.GetValuesForCreator(); break; case "Contributor": browseAttributes = DublinCoreReader.GetValuesForContributor(); break; case "Date": browseAttributes = DublinCoreReader.GetAllYears(); break; case "Subject": browseAttributes = DublinCoreReader.GetValuesForSubject(); break; default: browseAttributes = null; break; } Array.Sort(browseAttributes); browseMode = browseType; InstantAttributes(browseAttributes); }
public void TestGetAllYears_Descending() { // Test that all years are a returned in reverse-sorted order string[] years = DublinCoreReader.GetAllYears(); Assert.That(years.Length == 2); Assert.That(years[0] == "2016"); Assert.That(years[1] == "2015"); }
public void TestGetAllYears_Ascending() { // Test that all years are a returned in ascending order string[] years = DublinCoreReader.GetAllYears(true); Assert.That(years.Length == 2); Assert.That(years[0] == "2015"); Assert.That(years[1] == "2016"); }