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 TestGetIdentifiersForSubjects_01()
 {
     // Test that passing all subjects returns all artefacts
     string[] values      = DublinCoreReader.GetValuesForSubject();
     string[] identifiers = DublinCoreReader.GetIdentifiersForSubjects(values);
     Assert.That(identifiers.Length == 2);
 }
 public void TestGetIdentifiersForSubjects_02()
 {
     // Test set semantics (i.e. values[0] and values[1] are subjects for the same artefact, so should return one result)
     string[] values      = DublinCoreReader.GetValuesForSubject();
     string[] identifiers = DublinCoreReader.GetIdentifiersForSubjects(new string[] { values [0], values [1] });
     Assert.That(identifiers.Length == 1);
     Assert.That(identifiers[0] == "DeerMan");
 }
 public void TestGetIdentifiersForSubjects_03()
 {
     // Test that a Subject appearing in two artefacts returns two identifiers
     string[] values      = DublinCoreReader.GetValuesForSubject();
     string[] identifiers = DublinCoreReader.GetIdentifiersForSubjects(new string[] { values [2] });
     Assert.That(identifiers.Length == 2);
     Assert.That(identifiers[0] == "DeerMan");
     Assert.That(identifiers[1] == "TestMonk");
 }
 public void TestGetValuesForSubject()
 {
     string[] values = DublinCoreReader.GetValuesForSubject();
     Assert.That(values.Length == 4);
     Assert.That(values [0] == "Album Art");
     Assert.That(values [1] == "Music");
     Assert.That(values [2] == "Stuff Ryan made");
     Assert.That(values [3] == "Testing");
 }