Code example for HashSet

Methods: add

0
 
	@Test 
	public void testReadWritePermInformation() throws XMLPermutationProviderException, UnsupportedEncodingException { 
		XMLPermutationProvider xmlPermutationProvider = new XMLPermutationProvider();
 
		HashSet<String> set = new HashSet<String>();
		set.add("1");
		set.add("2");
		set.add("3");
		set.add("4");
		set.add("5");
 
		HashSet<BindingProperty> bpSet = new HashSet<BindingProperty>();
		bpSet.add(new BindingProperty("mgwt.os", "iphone"));
		bpSet.add(new BindingProperty("user.agent", "safari"));
 
		String permutationInformation = xmlPermutationProvider.writePermutationInformation("permTest", bpSet, set);
 
		ByteArrayInputStream inputStream = new ByteArrayInputStream(permutationInformation.getBytes("UTf-8"));
 
		Set<String> files = xmlPermutationProvider.getPermutationFiles(inputStream);
 
		Assert.assertEquals(set, files);
 
	} 
}