diff test/org/tmatesoft/hg/test/ErrorCollectorExt.java @ 442:6865eb742883

Tests for subrepo API, refactor status tests for reuse, better subrepos API
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 27 Apr 2012 20:57:20 +0200
parents 7af843ecc378
children 9c9d09111aee
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/ErrorCollectorExt.java	Thu Apr 26 12:42:32 2012 +0200
+++ b/test/org/tmatesoft/hg/test/ErrorCollectorExt.java	Fri Apr 27 20:57:20 2012 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 TMate Software Ltd
+ * Copyright (c) 2011-2012 TMate Software Ltd
  *  
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 
 import java.util.concurrent.Callable;
 
+import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matcher;
 import org.junit.internal.runners.model.MultipleFailureException;
 import org.junit.rules.ErrorCollector;
@@ -51,6 +52,10 @@
 		});
 	}
 	
+	public void assertTrue(final boolean value) {
+		assertTrue(null, value);
+	}
+
 	public void assertTrue(final String reason, final boolean value) {
 		checkSucceeds(new Callable<Object>() {
 			public Object call() throws Exception {
@@ -59,4 +64,8 @@
 			}
 		});
 	}
+	
+	public <T> void assertEquals(T expected, T actual) {
+		checkThat(null, actual, CoreMatchers.equalTo(expected));
+	}
 }
\ No newline at end of file