* Fixed a bug that adding counters with Skyship Plunder or Maulfist Revolution did not trigger counter added events.

This commit is contained in:
LevelX2 2017-01-13 22:40:37 +01:00
parent 350436dee2
commit 17fbee2400
6 changed files with 58 additions and 81 deletions

View file

@ -1,10 +1,9 @@
package mage.counters;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Custom unit tests for {@link Counter}
*/
@ -17,20 +16,6 @@ public class CounterTest {
counter = new Counter("test", 1);
}
@Test
public void shouldIncreaseCounter() {
// given
// when
counter.increase();
// then
assertEquals(2, counter.getCount());
assertEquals("test", counter.getName());
}
@Test
public void shouldAddMana() {
// given
@ -42,38 +27,10 @@ public class CounterTest {
assertEquals(6, counter.getCount());
}
@Test
public void shouldDecreaseCounter() {
// given
// when
counter.decrease();
// then
assertEquals(0, counter.getCount());
}
@Test
public void shouldNotDecreaseToLessThanZero() {
// given
// when
counter.decrease();
counter.decrease();
// then
assertEquals(0, counter.getCount());
}
@Test
public void shouldRemoveCounters() {
// given
// when
counter.remove(1);
@ -81,7 +38,6 @@ public class CounterTest {
assertEquals(0, counter.getCount());
}
@Test
public void shouldNotRemoveMoreCountersThanAvailable() {
// given
@ -93,7 +49,6 @@ public class CounterTest {
assertEquals(0, counter.getCount());
}
@Test
public void shouldReturnCopy() {
// given
@ -106,7 +61,6 @@ public class CounterTest {
assertFalse(copy == counter);
}
@Test
public void shouldCreateCounterFromCounter() {
// given
@ -119,12 +73,10 @@ public class CounterTest {
assertEquals("test", copy.getName());
}
@Test
public void shouldCreatDefaultCounter() {
// given
// when
Counter defaultCounter = new Counter("default");
@ -132,4 +84,4 @@ public class CounterTest {
assertEquals(1, defaultCounter.getCount());
assertEquals("default", defaultCounter.getName());
}
}
}