Beispiel #1
0
        public void AddTag(String TagName)
        {
            TagNames tag = new TagNames();

            tag.TagName = TagName;
            AddTag(tag);
        }
Beispiel #2
0
 public void TestTagExists()
 {
     TagNames tag = new TagNames("audio");
     Search.database.AddTag(tag);
     Assert.True(Search.database.TagExists(tag));
 }
Beispiel #3
0
 public void TestTagDoesntExist()
 {
     TagNames tag = new TagNames("audio");
     Assert.False(Search.database.TagExists(tag));
 }
Beispiel #4
0
        public void TestGetListOfAllTags()
        {
            var expected = new List<string>();
            expected.Add("audio");
            expected.Add("video");
            expected.Add("text");

            foreach (String s in expected)
            {
                TagNames tag = new TagNames();
                tag.TagName = s;
                Search.database.AddTag(tag);
            }

            var actual = Search.database.getListOfAllTags();
            expected.Sort();
            actual.Sort();

            Assert.AreEqual(expected, actual);
        }
Beispiel #5
0
        public void TestAddTagNameOther()
        {
            TagNames tag = new TagNames("Test Tag");
            Search.database.AddTag(tag);

            var tagActual = (from f in Search.database.TagNames
                             select f).First();

            Assert.AreEqual(tag.TagName, tagActual.TagName);
        }
Beispiel #6
0
 public Tag(CaesFile file, TagNames tag)
 {
     this.FilePath = file.Path;
     this.TagName = tag.TagName;
 }
Beispiel #7
0
 public void AddTag(TagNames tag)
 {
     this.TagNames.InsertOnSubmit(tag);
     this.SubmitChanges();
 }
Beispiel #8
0
 public void AddTag(String TagName)
 {
     TagNames tag = new TagNames();
     tag.TagName = TagName;
     AddTag(tag);
 }
Beispiel #9
0
 public bool TagExists(TagNames tag)
 {
     return TagExists(tag.TagName);
 }
Beispiel #10
0
 public bool TagExists(TagNames tag)
 {
     return(TagExists(tag.TagName));
 }
Beispiel #11
0
 public void AddTag(TagNames tag)
 {
     this.TagNames.InsertOnSubmit(tag);
     this.SubmitChanges();
 }
Beispiel #12
0
 public Tag(CaesFile file, TagNames tag)
 {
     this.FilePath = file.Path;
     this.TagName  = tag.TagName;
 }