agave-apps/apps-core/src/test/java/org/iplantc/service/apps/search/SoftwareSearchIT.java
/**
	 * Generates test cases using a list of ontologies, generating test cases to check that each can
	 * be searched via zero or more wildcards.
	 *
	 * @return test data
	 * @throws Exception
	 */
Generates test cases using a list of ontologies, generating test cases to check that each can
be searched via zero or more wildcards.

@return test data
@throws Exception
Generates test cases using a list of ontologies generating test cases to check that each can be searched via zero or more wildcards . @return test data @throws Exception
@DataProvider
	public Object[][] findMatchingOntologyProvider() throws Exception
	{
		JsonArray ontologies = new JsonArray();
		ontologies.add(new JsonPrimitive("http://purl.org/ontology/mo/Lyrics"));
		ontologies.add(new JsonPrimitive("http://purl.org/ontology/mo/MusicArtist"));
		ontologies.add(new JsonPrimitive("http://purl.org/ontology/mo/MusicalExpression"));
		List<Object[]> testCases = new ArrayList<Object[]>();
		Object ontology = null;
		for (int i=0; i<ontologies.size(); i++) {
			ontology = ontologies.get(i);
			testCases.add(new Object[]{ontologies, "ontology.like", ontology.toString(), false});
			testCases.add(new Object[]{ontologies, "ontology.like", "*" + ontology + "*", true});
			testCases.add(new Object[]{ontologies, "ontology.like", "*" + ontology, false});
			testCases.add(new Object[]{ontologies, "ontology.like", ontology + "*", false});
		}
		return testCases.toArray(new Object[][]{});
	}
@ DataProvider public Object [ ] [ ] findMatchingOntologyProvider ( ) throws Exception { JsonArray ontologies = new JsonArray ( ) ; ontologies . add ( new JsonPrimitive ( "http://purl.org/ontology/mo/Lyrics" ) ) ; ontologies . add ( new JsonPrimitive ( "http://purl.org/ontology/mo/MusicArtist" ) ) ; ontologies . add ( new JsonPrimitive ( "http://purl.org/ontology/mo/MusicalExpression" ) ) ; List < Object [ ] > testCases = new ArrayList < Object [ ] > ( ) ; Object ontology = null ; for ( int i = 0 ; i < ontologies . size ( ) ; i ++ ) { ontology = ontologies . get ( i ) ; testCases . add ( new Object [ ] { ontologies , "ontology.like" , ontology . toString ( ) , false } ) ; testCases . add ( new Object [ ] { ontologies , "ontology.like" , "*" + ontology + "*" , true } ) ; testCases . add ( new Object [ ] { ontologies , "ontology.like" , "*" + ontology , false } ) ; testCases . add ( new Object [ ] { ontologies , "ontology.like" , ontology + "*" , false } ) ; } return testCases . toArray ( new Object [ ] [ ] { } ) ; }
Generates test cases using a list of ontologies, generating test cases to check that each can
 be searched via zero or more wildcards.
Generates test cases using a list of ontologies generating test cases to check that each can be searched via zero or more wildcards .