package data.xml.cards.c;

import org.magicnexus.classes.data.ActivatedAbilityData;
import org.magicnexus.classes.data.SelfSourceData;
import org.magicnexus.classes.data.TriggeredAbilityData;
import org.magicnexus.classes.data.cost.ManaCostData;
import org.magicnexus.classes.data.cost.SelfTappingCostData;
import org.magicnexus.classes.data.effect.AddManaEffectData;
import org.magicnexus.classes.data.effect.ControllerDamageEffectData;
import org.magicnexus.classes.data.filter.SelfFilterData;
import org.magicnexus.classes.data.trigger.TappingTriggerData;
import org.magicnexus.interfaces.EManaSymbol;
import org.magicnexus.interfaces.EType;

import data.xml.cards.AbstractCardTestCase;


public class CityOfBrassTest extends AbstractCardTestCase
{
	
	@Override
	public String getCardName()
	{
		return "city of brass";
	}
	
	@Override
	public void testName()
	{
		assertEquals("City of Brass", getCard().getName());
	}
	
	@Override
	public void testSurtypes()
	{
		assertEmpty(getCard().getSurtypes());
	}
	
	@Override
	public void testTypes()
	{
		assertContains(getCard().getTypes(), EType.LAND);
	}
	
	@Override
	public void testSubtypes()
	{
		assertEmpty(getCard().getSubtypes());
	}
	
	@Override
	public void testManaCost()
	{
		assertEquals(new ManaCostData(), getCard().getManaCost());
	}
	
	@Override
	public void testPower()
	{
		assertNull(getCard().getPower());
	}
	
	@Override
	public void testToughness()
	{
		assertNull(getCard().getToughness());
	}
	
	@Override
	public void testLoyalty()
	{
		assertNull(getCard().getLoyalty());
	}
	
	@Override
	public void testRulesText()
	{
		assertEquals("Whenever City of Brass becomes tapped, it deals 1 damage to you.\n{T}: Add one mana of any color to your mana pool.", getCard().getRulesText());
	}
	
	@Override
	public void testActivatedAbilities()
	{
		ActivatedAbilityData activatedability = new ActivatedAbilityData();
		SelfTappingCostData cost = new SelfTappingCostData();
		activatedability.add(cost);
		AddManaEffectData effect = new AddManaEffectData();
		effect.add(EManaSymbol.W);
		activatedability.add(effect);
		
		assertContains(getCard().getActivatedAbilities(), activatedability);
		
		activatedability = new ActivatedAbilityData();
		activatedability.add(cost);
		effect = new AddManaEffectData();
		effect.add(EManaSymbol.U);
		activatedability.add(effect);
		
		assertContains(getCard().getActivatedAbilities(), activatedability);
		
		activatedability = new ActivatedAbilityData();
		activatedability.add(cost);
		effect = new AddManaEffectData();
		effect.add(EManaSymbol.B);
		activatedability.add(effect);
		
		assertContains(getCard().getActivatedAbilities(), activatedability);
		
		activatedability = new ActivatedAbilityData();
		activatedability.add(cost);
		effect = new AddManaEffectData();
		effect.add(EManaSymbol.R);
		activatedability.add(effect);
		
		assertContains(getCard().getActivatedAbilities(), activatedability);
		
		activatedability = new ActivatedAbilityData();
		activatedability.add(cost);
		effect = new AddManaEffectData();
		effect.add(EManaSymbol.G);
		activatedability.add(effect);
		
		assertContains(getCard().getActivatedAbilities(), activatedability);
	}
	
	@Override
	public void testTriggeredAbilities()
	{
		TriggeredAbilityData triggeredAbility = new TriggeredAbilityData();
		TappingTriggerData trigger = new TappingTriggerData();
		trigger.addFilter(new SelfFilterData());
		triggeredAbility.add(trigger);
		ControllerDamageEffectData effect = new ControllerDamageEffectData();
		effect.setQuantity(1);
		effect.setSource(new SelfSourceData());
		triggeredAbility.add(effect);
		
		assertContains(getCard().getTriggeredAbilities(), triggeredAbility);
	}
	
	@Override
	public void testStaticAbilities()
	{
		assertEmpty(getCard().getStaticAbilities());
	}
	
	@Override
	public void testSpellAbilities()
	{
		assertEmpty(getCard().getSpellAbilities());
	}
	
	@Override
	public void testAlternateCosts()
	{
		assertEmpty(getCard().getAlternateCosts());
	}
	
}
