Uploaded image for project: 'Medici'
  1. Medici
  2. MMDB-461

tags are not deleted

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.3
    • None
    • None
    • None

      Following test fails

      package edu.uiuc.ncsa.cet.bean.tupelo;

      import java.util.Set;

      import org.junit.Test;
      import org.tupeloproject.kernel.impl.MemoryContext;
      import org.tupeloproject.rdf.Resource;

      public class TagEventBeanUtilTest {
      TagEventBeanUtil getTebu()

      { return new TagEventBeanUtil((new MemoryContext()).getBeanSession()); }

      @Test
      public void testAddDelete() throws Exception

      { TagEventBeanUtil tebu = getTebu(); Resource subject = Resource.uriRef(); tebu.addTags(subject, null, "foo,bar"); tebu.getBeanSession().save(); Set<String> tags = tebu.getTags(subject); assert tags.contains("foo"); assert tags.contains("bar"); assert tags.size()==2; // now delete tebu.removeTags(subject, null, "foo"); tebu.getBeanSession().save(); tags = tebu.getTags(subject); assert tags.contains("bar"); assert tags.size()==1; tebu.removeTags(subject, null, "bar"); tebu.getBeanSession().save(); assert tags.size()==0; }

      }

              kooper Rob Kooper
              kooper Rob Kooper
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: