Project

General

Profile

« Previous | Next » 

Revision 57631

Assert in test

View differences:

PatchHostedByTest.java
27 27

  
28 28
	@Test
29 29
	public void testEvaluate() throws DocumentException, IOException {
30

  
31 30
		final Document doc = reader.read(xmlInput.getInputStream());
32

  
33 31
		for (Object o : doc.selectNodes(this.xpath)) {
34 32
			Assert.assertEquals("journal10808", o);
35 33
		}
36

  
37 34
	}
38 35

  
39
	@Test
40
	public void testEvaluate2() throws Exception{
41
		System.out.println(IOUtils.toString(xmlInput2.getInputStream(), StandardCharsets.UTF_8));
42 36

  
43
	}
44

  
45 37
	@Test
46 38
	public void testEvaluate3() throws Exception{
47 39
		HashMap<String, HostedByEntry> map = Maps.newHashMap();
48 40
		map.put("TIB.TEM", new HostedByEntry("123", "test repo"));
49 41
		PatchHostedBy phb = new PatchHostedBy(map,"//*[local-name() = 'setSpec']", new HostedByCounters());
50 42
		String res = phb.evaluate(IOUtils.toString(xmlInput3.getInputStream(), StandardCharsets.UTF_8));
51
		System.out.println(res);
43
		Assert.assertTrue(res.contains("123"));
52 44

  
53 45
	}
54 46

  

Also available in: Unified diff