AbstractServerResourceTest.java :  » UnTagged » otsopack » otsopack » full » java » network » communication » resources » Android Open Source

Android Open Source » UnTagged » otsopack 
otsopack » otsopack » full » java » network » communication » resources » AbstractServerResourceTest.java
/*
 * Copyright (C) 2008-2011 University of Deusto
 * 
 * All rights reserved.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.
 * 
 * This software consists of contributions made by many individuals, 
 * listed below:
 *
 * Author: Aitor Gmez Goiri <aitor.gomez@deusto.es>
 *
 */
package otsopack.full.java.network.communication.resources;

import static org.junit.Assert.assertTrue;

import java.util.Set;

import org.junit.Test;

public class AbstractServerResourceTest {
  /**
   * Test method for {@link otsopack.full.java.network.communication.resources.AbstractServerResource#getArgumentNamesFromURI(java.lang.String)}.
   */
  @Test
  public void testGetArgumentNamesFromURI() {
    final String rootURI = "http://rweg/rg/{ef}/{wew}/we/{sg}{sg2}/";
    AbstractServerResource asr = new AbstractServerResource();
    final Set<String> argumentnames = asr.getArgumentNamesFromURI(rootURI);
    
    assertTrue( argumentnames.contains("ef") );
    assertTrue( argumentnames.contains("wew") );
    assertTrue( argumentnames.contains("sg") );
    assertTrue( argumentnames.contains("sg2") );
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.