:  » JPA » vars-redux » vars » Java Open Source

Java Open Source » JPA » vars redux 
vars redux » vars »
package vars;

import java.util.Collection;

import org.junit.Assert;
import org.junit.Test;


public class LinkUtilitiesTest {
    public void testFindLinkIn() {
        LinkComparator comparator = new LinkComparator();
        ILink link = new LinkBean("test", ILink.VALUE_SELF, ILink.VALUE_NIL);
        Collection<ILink> links = ImmutableList.of( 
                new LinkBean("test", ILink.VALUE_NIL, ILink.VALUE_NIL),
                new LinkBean("test-02", ILink.VALUE_SELF, ILink.VALUE_SELF),
                new LinkBean("test-03", ILink.VALUE_SELF, ILink.VALUE_NIL),
                new LinkBean("test-04", ILink.VALUE_SELF, ILink.VALUE_NIL),
                new LinkBean("test-05", ILink.VALUE_SELF, ILink.VALUE_NIL),
                new LinkBean("test", ILink.VALUE_SELF, ILink.VALUE_NIL),
        Collection<ILink> matchingLinks = LinkUtilities.findMatchingLinksIn(links, link);
        Assert.assertTrue("No match was found", matchingLinks.size() == 2);

}  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.