A set of assert methods. Messages are only displayed when an assert fails.
assertEquals
public static void assertEquals(boolean expected,
boolean actual) Asserts that two booleans are equal.
View More Examples of assertEquals(boolean expected,boolean actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertEquals
public static void assertEquals(byte expected,
byte actual) Asserts that two bytes are equal.
View More Examples of assertEquals(byte expected,byte actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertEquals
public static void assertEquals(char expected,
char actual) Asserts that two chars are equal.
View More Examples of assertEquals(char expected,char actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertEquals
public static void assertEquals(double expected,
double actual,
double delta) Asserts that two doubles are equal concerning a delta. If the expected
value is infinity then the delta value is ignored.
View More Examples of assertEquals(double expected,double actual,double delta)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(float expected,
float actual,
float delta) Asserts that two floats are equal concerning a delta. If the expected
value is infinity then the delta value is ignored.
View More Examples of assertEquals(float expected,float actual,float delta)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(int expected,
int actual) Asserts that two ints are equal.
View More Examples of assertEquals(int expected,int actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertEquals
public static void assertEquals(Object expected,
Object actual) Asserts that two objects are equal. If they are not
an AssertionFailedError is thrown.
View More Examples of assertEquals(Object expected,Object actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertEquals
public static void assertEquals(String message,
boolean expected,
boolean actual) Asserts that two booleans are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,boolean expected,boolean actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(String message,
byte expected,
byte actual) Asserts that two bytes are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,byte expected,byte actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(String message,
char expected,
char actual) Asserts that two chars are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,char expected,char actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(String message,
double expected,
double actual,
double delta) Asserts that two doubles are equal concerning a delta. If they are not
an AssertionFailedError is thrown with the given message. If the expected
value is infinity then the delta value is ignored.
View More Examples of assertEquals(String message,double expected,double actual,double delta)
1:
2: import ;
3: import ;
4: ...
5: public void testComputePoints() {
6: Assert.assertEquals(-8, elo.computePoints(1000, 1000, 3, 6));
7: ...
8: Assert.assertEquals(-1*elo.computePoints(0, 1000, 3, 6), elo
9: .computePoints(1000, 0, 6, 3));
10: ...
11: Assert.assertEquals(-1*elo.computePoints(1000, 1000, 3, 6), elo
View Full Code Here
1:
2: import ;
3:
4: ...
5: Position position = Position.initialPosition();
6: Assert.assertEquals(0, evaluator.evaluate(null, position, Color.WHITE), 0);
7:
8: ...
9: true, Square.newSquare("b2"), 1, 1);
10: Assert.assertEquals(1, evaluator.evaluate(null, position, Color.WHITE), 0);
11:
12: ...
13: chessboard.setPiece(Square.newSquare("b8"), Piece.BLACK_BISHOP);
14: Assert.assertEquals(-3, evaluator.evaluate(null, position, Color.WHITE), 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: if(Double.isNaN(expected)){
6: Assert.assertTrue("" + actual + " is not NaN.",
7: Double.isNaN(actual));
8: ...
9: } else {
10: Assert.assertEquals(msg, expected, actual, delta);
11: }
12: ...
13: public static void assertEquals(double a[], double b[], double tolerance) {
14: Assert.assertEquals(a.length, b.length);
View Full Code Here
assertEquals
public static void assertEquals(String message,
float expected,
float actual,
float delta) Asserts that two floats are equal concerning a positive delta. If they
are not an AssertionFailedError is thrown with the given message. If the
expected value is infinity then the delta value is ignored.
View More Examples of assertEquals(String message,float expected,float actual,float delta)
1:
2: import ;
3: import ;
4: ...
5: public void testComputePoints() {
6: Assert.assertEquals(-8, elo.computePoints(1000, 1000, 3, 6));
7: ...
8: Assert.assertEquals(-1*elo.computePoints(0, 1000, 3, 6), elo
9: .computePoints(1000, 0, 6, 3));
10: ...
11: Assert.assertEquals(-1*elo.computePoints(1000, 1000, 3, 6), elo
View Full Code Here
1:
2: import ;
3:
4: ...
5: Position position = Position.initialPosition();
6: Assert.assertEquals(0, evaluator.evaluate(null, position, Color.WHITE), 0);
7:
8: ...
9: true, Square.newSquare("b2"), 1, 1);
10: Assert.assertEquals(1, evaluator.evaluate(null, position, Color.WHITE), 0);
11:
12: ...
13: chessboard.setPiece(Square.newSquare("b8"), Piece.BLACK_BISHOP);
14: Assert.assertEquals(-3, evaluator.evaluate(null, position, Color.WHITE), 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: if(Double.isNaN(expected)){
6: Assert.assertTrue("" + actual + " is not NaN.",
7: Double.isNaN(actual));
8: ...
9: } else {
10: Assert.assertEquals(msg, expected, actual, delta);
11: }
12: ...
13: public static void assertEquals(double a[], double b[], double tolerance) {
14: Assert.assertEquals(a.length, b.length);
View Full Code Here
assertEquals
public static void assertEquals(String message,
int expected,
int actual) Asserts that two ints are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,int expected,int actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(String message,
Object expected,
Object actual) Asserts that two objects are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,Object expected,Object actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
View More Examples of assertEquals(String expected,String actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
View More Examples of assertEquals(String message,String expected,String actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(String message,
long expected,
long actual) Asserts that two longs are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,long expected,long actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(String message,
short expected,
short actual) Asserts that two shorts are equal. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertEquals(String message,short expected,short actual)
1:
2: import ;
3:
4: ...
5: public void testRegEx() {
6: Assert.assertEquals("ab",
7: Pattern.compile("([+x!]?)").matcher("a+xb").replaceAll(""));
8: ...
9: Assert.assertEquals("a/b/c", "a.b.c".replaceAll("[.]", "/"));
10: }
11: ...
12: public void testFloor() {
13: Assert.assertEquals(0,
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: String[] strings) {
6: Assert.assertEquals(strings.length, tokens.length);
7:
8: ...
9: for (int i = 0; i < tokens.length; i++) {
10: Assert.assertEquals("index " + i, strings[i], tokens[i].termText());
11: }
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals("David Bau", order.getCustomer().getName());
7: ...
8: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
9: ...
10: Assert.assertEquals(3, order.sizeOfLineItemArray());
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: XmlObject.Factory.parse(TestEnv.xbeanCase("store/easypo1.xml"));
6: Assert.assertEquals(false, doc.isNil());
7: PurchaseOrder order = doc.getPurchaseOrder();
8: ...
9: Assert.assertEquals("David Bau", order.getCustomer().getName());
10: ...
11: Assert.assertEquals("Gladwyne, PA", order.getCustomer().getAddress());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5:
6: Assert.assertEquals(simpleDocument, doc.xmlText());
7:
8: ...
9:
10: Assert.assertEquals(simpleDocument, newdoc.xmlText());
11: }
12: ...
13: Assert.assertEquals("David Bau", neworder.getCustomer().getName());
14: Assert.assertEquals("Gladwyne, PA", neworder.getCustomer().getAddress());
View Full Code Here
assertEquals
public static void assertEquals(long expected,
long actual) Asserts that two longs are equal.
View More Examples of assertEquals(long expected,long actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertEquals
public static void assertEquals(short expected,
short actual) Asserts that two shorts are equal.
View More Examples of assertEquals(short expected,short actual)
1:
2: import ;
3: import ;
4: ...
5: Principal ppal = PrincipalUtils.getPrincipal("net.sf.jguard.core.principals.RolePrincipal",RolePrincipal.getName("stuff"));
6: Assert.assertEquals(RolePrincipal.class,ppal.getClass());
7: ...
8: Assert.assertEquals("*#stuff",ppal.getName());
9:
10: ...
11: Principal ppal2 = PrincipalUtils.getPrincipal("org.bouncycastle.jce.X509Principal","C=AU,ST=Victoria");
12: Assert.assertEquals(org.bouncycastle.jce.X509Principal.class,ppal2.getClass());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: model.doReset(true);
6: Assert.assertEquals("0", model.getCurrentState());
7: int action0 = model.fsmFindAction("action0");
8: ...
9: int rubbish = model.fsmFindAction("rubbish");
10: Assert.assertTrue(action0 >= 0);
11: ...
12: Assert.assertTrue(action1 >= 0);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: ...
10: Assert.assertTrue( buf.capacity() >= i );
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: cur.setTextValue("<something or other:\u03C0\uD7FF>");
6: Assert.assertEquals("<test><something or other:\u03C0\uD7FF></test>" + newLine, xdoc.toString());
7:
8: ...
9: cur.setTextValue("<something\0or\1other:\u0045\uFFFE\uD800\uDFFF\uDB80\uDC00\u03C0\uD7FF\u001F>");
10: Assert.assertEquals("<test><something?or?other:\u0045?????\u03C0\uD7FF?></test>" + newLine, xdoc.toString());
11: }
12: ...
13: PositionDocument doc = PositionDocument.Factory.parse("<position xmlns='java:int.test'><lat>43</lat><lon>037</lon></position>");
14: Assert.assertEquals(43, doc.getPosition().getLat());
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: GregorianCalendar gcal = new XmlCalendar(date);
6: Assert.assertEquals(date, gcal.getTime());
7:
8: ...
9: Date gcd = gc.getTime();
10: Assert.assertEquals(gdd, gcd);
11:
12: ...
13: Calendar gregcal = new GDate("--02-29").getCalendar();
14: Assert.assertEquals(29, gregcal.get(Calendar.DAY_OF_MONTH));
View Full Code Here
assertFalse
public static void assertFalse(boolean condition)
Asserts that a condition is false. If it isn't it throws
an AssertionFailedError.
View More Examples of assertFalse(boolean condition)
1:
2: Assert.assertFalse(PropertiesManager.isInitialized());
3:
4: ...
5: String key = PropertiesManager.getDefaultPropertyKey();
6: Assert.assertEquals("org.randomtask.properties.default", key);
7:
8: ...
9: PropertiesManager.setDefaultPropertyKey("nosuchproperty");
10: Assert.assertEquals("nosuchproperty",
11: PropertiesManager.getDefaultPropertyKey());
12: ...
13:
14: Assert.assertEquals(false, PropertiesManager.initialize());
View Full Code Here
1:
2: Assert.assertEquals(name, group.getName());
3: ...
4: Assert.assertEquals(expanded, group.isExpanded());
5: }
6: ...
7:
8: Assert.assertEquals(a, group.getContact("a"));
9:
10: ...
11: for (int i = 0; i < contacts.length; i++) {
12: Assert.assertFalse("a".equals(contacts[i].getName()));
View Full Code Here
1: properties.remove(ConnectionManager.CONNECTIONS_KEY);
2: Assert.assertFalse(ConnectionManager.initialize());
3:
4: ...
5: properties.remove("default." + ConnectionManager.CONNECTION_TYPE_KEY);
6: Assert.assertFalse(ConnectionManager.initialize("default"));
7: ...
8: Assert.assertFalse(ConnectionManager.isInitialized());
9:
10: ...
11: ConnectionManager.CONNECTION_TYPE_KEY, "nosuchtype");
12: Assert.assertFalse(ConnectionManager.initialize("default"));
View Full Code Here
1:
2: import ;
3:
4: ...
5: e.printStackTrace(System.out);
6: Assert.fail();
7: }finally{
8: ...
9: position = position.positionAfterMove(Move.newMove(position, "h3f1"));
10: Assert.assertTrue(position.getChessboard().isKingControlled(Color.WHITE));
11: PositionEvaluator evaluator = SimpleEvaluator.newCommonEvaluator();
12: ...
13: BestMove bestMove = engine.bestMove(game);
14: Assert.assertFalse(Move.newMove(game.getPosition(), "b7d7").equals(bestMove.getMove()));
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: try {
6: Assert.assertFalse(ExceptionUtils.isCauseMethodName(methodName));
7: ExceptionUtils.addCauseMethodName(methodName);
8: ...
9: ExceptionUtils.addCauseMethodName(methodName);
10: Assert.assertTrue(ExceptionUtils.isCauseMethodName(methodName));
11: } finally {
12: ...
13: ExceptionUtils.removeCauseMethodName(methodName);
14: Assert.assertFalse(
View Full Code Here
assertFalse
public static void assertFalse(String message,
boolean condition) Asserts that a condition is false. If it isn't it throws
an AssertionFailedError with the given message.
View More Examples of assertFalse(String message,boolean condition)
1:
2: import junit.framework.Assert.assertFalse;
3: ...
4: import junit.framework.Assert.assertNotNull;
5: ...
6: import junit.framework.Assert.assertTrue;
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: {
6: Assert.assertTrue(x10y20.isDefined(x));
7: ...
8: Assert.assertTrue(x10y20.isDefined(y));
9: Assert.assertFalse(x10.isDefined(y));
10: ...
11: {
12: Assert.assertFalse(x10y20.isDefinedSince(x10,x));
View Full Code Here
1: Date d = s.getStartTime();
2: Assert.assertNotNull("start time !null", d);
3: ...
4: Assert.assertTrue("start time != epoch (" + d + ")", !d.equals(new Date()));
5:
6: ...
7: s.stop();
8: Assert.assertTrue("stopped session", true);
9: }
10: ...
11: GrouperSession b = SessionHelper.getRootSession();
12: Assert.assertFalse("a != b", a.equals(b));
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: ("TestSpec",testSql_1, ssp_1, SqlStmtSpec.FOR_QUERY);
6: Assert.assertNotNull(sss);
7: }
8: ...
9: {
10: Assert.assertFalse("testSqlStmtSpecCreate: " + e, true);
11: }
12: ...
13: String[] choppedSql = this.sss.getChoppedSQL();
14: Assert.assertNotNull(choppedSql);
View Full Code Here
1:
2: import ;
3:
4: ...
5: if(forValid) {
6: Assert.assertTrue("Move:" + move + " not found.", valid);
7: }else{
8: ...
9: Assert.assertFalse("Move:" + move + " found.", valid);
10: }
11: ...
12: if(bestMoveToCheck == null) {
13: Assert.fail("Diag. " + fileName + ", move=" + (i+1));
View Full Code Here
assertNotNull
public static void assertNotNull(Object object)
Asserts that an object isn't null.
View More Examples of assertNotNull(Object object)
1:
2: import ;
3: import ;
4: ...
5: public int isomorphicHashCode() {
6: Assert.assertNotNull(getFunctionArgumentDeclarationList());
7: ...
8: Assert.assertNotNull(_parametricFunctionCallDeclaration.getFunctionArgumentDeclarationList());
View Full Code Here
1:
2: import ;
3:
4: ...
5: {
6: Assert.assertNotNull(channel);
7: EventChannel _channel = EventChannelHelper.narrow(channel);
8: ...
9: Assert.assertNotNull(_channel);
10:
11: ...
12: SupplierAdmin _admin = _channel.for_suppliers();
13: Assert.assertNotNull(_admin);
View Full Code Here
1:
2: import ;
3:
4: ...
5: EventChannel _channel = EventChannelHelper.narrow(channel);
6: Assert.assertNotNull(_channel);
7:
8: ...
9: ConsumerAdmin _admin = _channel.for_consumers();
10: Assert.assertNotNull(_admin);
11:
12: ...
13: mySupplier_ = _admin.obtain_push_supplier();
14: Assert.assertNotNull(mySupplier_);
View Full Code Here
assertNotNull
public static void assertNotNull(String message,
Object object) Asserts that an object isn't null. If it is
an AssertionFailedError is thrown with the given message.
View More Examples of assertNotNull(String message,Object object)
1:
2: import ;
3: import ;
4: ...
5: IDeclaration newDeclaration) {
6: Assert.assertEquals(oldDeclaration, getDeclaration(object));
7: _map.put(object, newDeclaration);
8: ...
9:
10: if (Assert.ASSERTION_ON) {
11: ...
12: Assert.assertNotNull("object", object);
View Full Code Here
1: Group g = m.toGroup();
2: Assert.assertTrue("converted member to group", true);
3: ...
4: Assert.assertNotNull("g !null", g);
5: ...
6: Assert.assertTrue(
7: "m subj id", m.getSubjectId().equals(g.getUuid())
8: ...
9: );
10: Assert.assertTrue(
View Full Code Here
1: );
2: Assert.assertTrue("failed to find bad member", true);
3:
4: ...
5: );
6: Assert.assertTrue("found member", true);
7: if (s.getMember().equals(m)) {
8: ...
9: Assert.assertTrue("s.getMember().equals(m)", true);
10: }
11: ...
12: Member mBS = MemberFinder.findBySubject(s, s.getSubject());
13: Assert.assertNotNull("mBS !null", mBS);
View Full Code Here
1: );
2: Assert.assertNotNull("s !null", s);
3: ...
4: Assert.assertNotNull("session_id !null", s.getSessionId());
5: ...
6: Assert.assertTrue("has sessionID", !s.getSessionId().equals(""));
7: ...
8: Assert.assertNotNull("subject !null", s.getSubject());
View Full Code Here
1: GrouperConfig cfg = GrouperConfig.getInstance();
2: Assert.assertNotNull("cfg !null", cfg);
3: ...
4: Assert.assertTrue("cfg instanceof GrouperConfig", cfg instanceof GrouperConfig);
5:
6: ...
7: String v = "edu.internet2.middleware.grouper.GrouperAccessAdapter";
8: Assert.assertTrue(k, cfg.getProperty(k).equals(v));
9: k = "privileges.naming.interface";
10: ...
11: v = "edu.internet2.middleware.grouper.GrouperNamingAdapter";
12: Assert.assertTrue(k, cfg.getProperty(k).equals(v));
View Full Code Here
assertNotSame
public static void assertNotSame(Object expected,
Object actual) Asserts that two objects do not refer to the same object. If they do
refer to the same object an AssertionFailedError is thrown.
View More Examples of assertNotSame(Object expected,Object actual)
1:
2: import ;
3: import ;
4: ...
5: if (oldSituationDeclaration != null) {
6: Assert.assertNotSame(oldSituationDeclaration, getSituationDeclaration());
7: oldSituationDeclaration.remove();
8: }
9: }
View Full Code Here
1: package ;
2: import ;
3: import ;
4: ...
5: protected void executeBefore() throws SimulationRuntimeException {
6: Assert.assertTrue(_initialized);
7:
8: ...
9: if (function instanceof IFunctionArgument) {
10: Assert.assertSame(
11: function,
12: ...
13:
14: Assert.assertNotSame(oldArgumentBindings, _functionWithArgumentBinds.getMutableArgumentBindings());
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5: ByteBuffer buf = ByteBuffer.allocate( i );
6: Assert.assertEquals( 0, buf.position() );
7: ...
8: Assert.assertEquals( buf.capacity(), buf.remaining() );
9: Assert.assertTrue( buf.capacity() >= i );
10: ...
11: buf.release();
12: Assert.assertNotSame( nioBuf, ByteBuffer.allocate( 16 ).buf() );
View Full Code Here
1:
2: Assert.assertNotSame(control, equalToControl);
3: ...
4: Assert.assertNotSame(control, equalToControl2);
5:
6: ...
7: public void eachMapEntry(Object key, Object value) {
8: Assert.assertNotSame(
9: nameOf(key) + " same as control",
10: ...
11: value);
12: Assert.assertNotSame(
View Full Code Here
assertNotSame
public static void assertNotSame(String message,
Object expected,
Object actual) Asserts that two objects do not refer to the same object. If they do
refer to the same object an AssertionFailedError is thrown with the
given message.
View More Examples of assertNotSame(String message,Object expected,Object actual)
assertNull
public static void assertNull(Object object)
Asserts that an object is null.
View More Examples of assertNull(Object object)
1:
2: Assert.assertFalse(PropertiesManager.isInitialized());
3:
4: ...
5: String key = PropertiesManager.getDefaultPropertyKey();
6: Assert.assertEquals("org.randomtask.properties.default", key);
7:
8: ...
9: PropertiesManager.setDefaultPropertyKey("nosuchproperty");
10: Assert.assertEquals("nosuchproperty",
11: PropertiesManager.getDefaultPropertyKey());
12: ...
13: Assert.assertEquals(false, PropertiesManager.initialize());
14: Assert.assertNull(PropertiesManager.getPropertiesReader());
View Full Code Here
1: Messenger messenger = SessionManager.getMessenger(identities[i]);
2: Assert.assertEquals(messengers[i], messenger);
3:
4: ...
5: identities[i].getUsername(), identities[i].getMessenger());
6: Assert.assertEquals(messengers[i], messenger);
7:
8: ...
9: Session session = SessionManager.getSession(identities[i]);
10: Assert.assertEquals(sessions[i], session);
11:
12: ...
13: SessionManager.removeSession(identities[i]);
14: Assert.assertNull(SessionManager.getMessenger(identities[i]));
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5:
6: if (Assert.ASSERTION_ON) {
7: counter++;
8: ...
9: if (reasoningEngine == null) {
10: if (Assert.ASSERTION_ON && FunctionDeclarationCompiler.LOGGER.isLoggable(Level.INFO)) {
11: FunctionDeclarationCompiler.LOGGER.info(
12: ...
13: } else {
14: Assert.assertNull(_reasoningEngines[i]);
View Full Code Here
1: package ;
2: import ;
3: import ;
4: ...
5: public void setOtherwiseToAtomicActivity(IActivityGraphLeaf newOtherwiseToAtomicActivity) {
6: if (Assert.ASSERTION_ON) {
7: ...
8: Assert.assertNull(_otherwiseToAtomicActivity);
9: ...
10: Assert.assertNotNull(newOtherwiseToAtomicActivity);
View Full Code Here
assertNull
public static void assertNull(String message,
Object object) Asserts that an object is null. If it is not
an AssertionFailedError is thrown with the given message.
View More Examples of assertNull(String message,Object object)
1:
2: import junit.framework.Assert.assertEquals;
3: ...
4: import junit.framework.Assert.assertFalse;
5: ...
6: import junit.framework.Assert.assertNotNull;
7: import junit.framework.Assert.assertNull;
View Full Code Here
assertSame
public static void assertSame(Object expected,
Object actual) Asserts that two objects refer to the same object. If they are not
the same an AssertionFailedError is thrown.
View More Examples of assertSame(Object expected,Object actual)
1:
2: import ;
3: import ;
4: ...
5: protected ExpertFilterFunctionDeclarationListAble createInstance() {
6: Assert.assertSame(ExpertFilterUserFunctionDeclarationListAble.class, getClass());
7: return new ExpertFilterUserFunctionDeclarationListAble();
8: }
9: }
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5:
6: Assert.assertNotNull(getSeSAmModelDeclaration());
7:
8: ...
9: protected ExpertFilterFunctionDeclarationListAble createInstance() {
10: Assert.assertSame(ExpertFilterUserFeatureFunctionDeclarationListAble.class, getClass());
11: return new ExpertFilterUserFeatureFunctionDeclarationListAble();
View Full Code Here
1:
2: import junit.framework.Assert.assertEquals;
3: ...
4: import junit.framework.Assert.assertNull;
5: ...
6: import junit.framework.Assert.assertSame;
7: import junit.framework.Assert.assertTrue;
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5:
6: Assert.assertNotNull(getSeSAmModelDeclaration());
7:
8: ...
9: protected ExpertFilterFunctionDeclarationListAble createInstance() {
10: Assert.assertSame(ExpertFilterFunctionDeclarationListAble.class, getClass());
11: return new ExpertFilterFunctionDeclarationListAble();
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5:
6: Assert.assertSame(composedTypeAttribute, _composedTypeAttribute);
7:
8: ...
9: public int hashCode() {
10: Assert.assertNotNull(getComposedTypeAttribute());
11: return getComposedTypeAttribute().hashCode();
View Full Code Here
assertSame
public static void assertSame(String message,
Object expected,
Object actual) Asserts that two objects refer to the same object. If they are not
an AssertionFailedError is thrown with the given message.
View More Examples of assertSame(String message,Object expected,Object actual)
assertTrue
public static void assertTrue(boolean condition)
Asserts that a condition is true. If it isn't it throws
an AssertionFailedError.
View More Examples of assertTrue(boolean condition)
1: package ;
2: import ;
3: import ;
4: ...
5:
6: if (Assert.ASSERTION_ON)
7: ...
8: Assert.assertTrue(!FunctionActionFactory.isNoopFunction(function2));
9: _functionAction2 = function2;
10: ...
11:
12: Assert.assertTrue(!FunctionActionFactory.isNoopFunction(function1));
View Full Code Here
1: d.setDatagramFlagBits(0xeaeaeaea);
2: Assert.assertEquals(d.getDatagramFlags(), 0xeaeaeaea);
3: d.unsetDatagramFlagBits(0xeaeaeaea);
4: ...
5: Assert.assertEquals(d.getDatagramFlags(), 0);
6: }
7: ...
8: theBasics(ad);
9: Assert.assertTrue(ad.isNegativeAck());
10: ...
11: Assert.assertTrue(ad.getAckMessageId() == null);
View Full Code Here
1: s = ts_client.createDurableSubscriber(durableTopic, "durable-2");
2: Assert.assertTrue(s.receiveNoWait() == null);
3: ts_client.unsubscribe("durable-2");
4: ...
5: a.output(ad, h);
6: Assert.assertEquals(one.get(), 1);
7:
8: ...
9: a.disconnect(nodeOne);
10: Assert.assertTrue(!a.isOpen());
11: try {
12: ...
13: a.output(ad, h);
14: Assert.assertTrue(false);
View Full Code Here
1:
2: import ;
3: import ;
4: ...
5:
6: Assert.assertTrue(aModel.listBookmarks().contains(aBookmark1));
7: ...
8: Assert.assertTrue(aModel.listBookmarks().contains(aBookmark2));
9:
10: ...
11:
12: Assert.assertFalse(aModel.listBookmarks().contains(aBookmark1));
View Full Code Here
assertTrue
public static void assertTrue(String message,
boolean condition) Asserts that a condition is true. If it isn't it throws
an AssertionFailedError with the given message.
View More Examples of assertTrue(String message,boolean condition)
1: Source src = m.getSubjectSource();
2: Assert.assertNotNull("src !null", src);
3: ...
4: Assert.assertTrue("src instanceof Source", src instanceof Source);
5: }
6: ...
7: catch (Exception e) {
8: Assert.fail(e.getMessage());
9: }
10: ...
11: Assert.assertTrue(eIP.getMessage(), true);
12: Assert.assertTrue("unchanged", m.getSubjectId().equals(orig));
View Full Code Here
1: ConfigsMBean mbean = new ConfigsMBean();
2: Assert.assertTrue(mbean != null);
3: }
4: ...
5: ObjectName on = configsMBean.getConfigMBean(getTarget());
6: Assert.assertEquals(getConfigMBean(), on);
7: }
8: ...
9: ObjectName on = configsMBean.getHttpServiceMBean(getTarget());
10: Assert.assertEquals(getHttpService(), on);
11: }
12: ...
13: Assert.assertTrue(authRealms != null);
14: Assert.assertTrue(exists(on, authRealms));
View Full Code Here
1: String candidateName = "abc";
2: Assert.assertEquals(candidateName, CycConstant.makeValidConstantName(candidateName));
3: String expectedValidName = "______abc";
4: ...
5: Assert.assertEquals(expectedValidName, CycConstant.makeValidConstantName(candidateName));
6: System.out.println("**** testMakeValidConstantName OK ****");
7: ...
8: System.out.println(CycAccess.current().cycConnection.connectionInfo());
9: Assert.fail(e.toString());
10: }
11: ...
12: CycConstant worldGeographyMt = cycAccess.getKnownConstantByGuid("bfaac020-9c29-11b1-9dad-c379636f7270");
13: Assert.assertTrue(cycAccess.countAllInstances(country, worldGeographyMt) > 0);
View Full Code Here
fail
public static void fail()
Fails a test with no message.
View More Examples of fail()
1: package ;
2: import ;
3: import ;
4: ...
5: public IFunction createFunction(ICreateFunctionArgs createFunctionArgs, IFunctionList functions) {
6: if (Assert.ASSERTION_ON)
7: ...
8: Assert.assertEquals(1, functions.size());
9: return new CopyListFunction((IFunction) functions.get(0));
10: ...
11: } else {
12: Assert.fail();
View Full Code Here
fail
public static void fail(String message)
Fails a test with the given message.
View More Examples of fail(String message)
1: package ;
2: import ;
3: import ;
4: ...
5: if (!(_modelReader.containsXMLObject(_rootObject)))
6: Assert.fail("DelayedSimObjectType(" + _rootObject + ") is accessed before it was evaluated");
7: else
8: ...
9: e.printStackTrace();
10: Assert.fail(e.getMessage());
11: }
View Full Code Here
1: );
2: Assert.assertTrue("failed to find bad member", true);
3:
4: ...
5: );
6: Assert.assertTrue("found member", true);
7: if (s.getMember().equals(m)) {
8: ...
9: Assert.assertTrue("s.getMember().equals(m)", true);
10: }
11: ...
12: else {
13: Assert.fail("s.getMember().equals(m)");
View Full Code Here
1: import ;
2: import ;
3:
4: ...
5: {
6: Assert.assertNotNull( amL );
7: AnalysisModuleSet ams = new AnalysisModuleSet( amL );
8: ...
9: {
10: Assert.assertNotNull(
11: "Null method.",
12: ...
13: }
14: Assert.fail( "Class "+mc.getClassName()+
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: catch (PluginParametersException pParamsException) {
6: Assert.fail("setUp() failed with "+pParamsException);
7: }
8: ...
9: catch (CloneNotSupportedException pCNSException) {
10: Assert.fail("setUp() failed with "+pCNSException);
11: }
12: ...
13: catch (Exception pException) {
14: Assert.fail("setUp() failed with "+pException);
View Full Code Here
1: import ;
2: import ;
3: import ;
4: ...
5: catch (PluginParametersException pParamsException) {
6: Assert.fail("setUp() failed with "+pParamsException);
7: }
8: ...
9: catch (CloneNotSupportedException pCNSException) {
10: Assert.fail("setUp() failed with "+pCNSException);
11: }
12: ...
13: catch (Exception pException) {
14: Assert.fail("setUp() failed with "+pException);
View Full Code Here