package test.main;
import net.sf.nebulacards.main.PlayingCard;
import net.sf.nebulacards.main.NullPlayingCard;
import junit.framework.*;
public class NullPlayingCardTest
extends TestCase
{
PlayingCard npc;
public NullPlayingCardTest(String s) { super(s); }
public void setUp()
{
npc = NullPlayingCard.getInstance();
}
public void testTrivial()
{
assertTrue(npc.isNull());
}
public void testComparison()
{
// try to trick the equals function
PlayingCard c = new PlayingCard(npc.getVal(), npc.getSuit());
assertFalse(npc.equals(c));
assertFalse(c.equals(npc));
}
public void testToString()
{
assertEquals(npc, PlayingCard.fromString(npc.toString()));
}
}