stendhal/tests/conf/TestRPClass.java

35 lines
1.3 KiB
Java
Raw Permalink Normal View History

2010-09-19 01:29:21 +00:00
/* $Id$ */
/***************************************************************************
* (C) Copyright 2003-2010 - Stendhal *
***************************************************************************
***************************************************************************
* *
* 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 *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
2007-05-19 21:11:29 +00:00
package conf;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
2017-05-28 01:03:01 +02:00
import marauroa.common.game.RPClass;
2007-05-19 22:09:39 +00:00
public class TestRPClass {
2007-08-15 21:16:46 +00:00
2007-05-19 21:11:29 +00:00
@Test
2007-08-15 21:16:46 +00:00
public void subclass() {
final RPClass rpsuper = new RPClass("super");
2007-05-19 21:11:29 +00:00
assertTrue(rpsuper.subclassOf("super"));
final RPClass sub = new RPClass("sub");
2007-05-19 21:11:29 +00:00
assertFalse(sub.subclassOf(("super")));
sub.isA("super");
assertTrue(sub.subclassOf(("super")));
}
}