public void testPushSuite() {
    myTestSuiteStack.pushSuite(mySuite);
    assertEquals(1, myTestSuiteStack.getStackSize());
    assertEquals(mySuite, myTestSuiteStack.getCurrentSuite());

    myTestSuiteStack.pushSuite(mySuite);
    assertEquals(2, myTestSuiteStack.getStackSize());
    assertEquals(mySuite, myTestSuiteStack.getCurrentSuite());

    final SMTestProxy newSuite = createSuiteProxy();
    myTestSuiteStack.pushSuite(newSuite);
    assertEquals(3, myTestSuiteStack.getStackSize());
    assertEquals(newSuite, myTestSuiteStack.getCurrentSuite());
  }
  public void testPopInconsistentSuite_NormalMode() throws Throwable {
    final String suiteName = mySuite.getName();

    myTestSuiteStack.pushSuite(createSuiteProxy("0"));
    myTestSuiteStack.pushSuite(mySuite);
    myTestSuiteStack.pushSuite(createSuiteProxy("2"));
    myTestSuiteStack.pushSuite(createSuiteProxy("3"));

    assertEquals(4, myTestSuiteStack.getStackSize());
    assertEquals("3", myTestSuiteStack.getCurrentSuite().getName());

    assertNotNull(myTestSuiteStack.popSuite(suiteName));
    assertEquals(1, myTestSuiteStack.getStackSize());
  }
  public void testPopInconsistentSuite_DebugMode() throws Throwable {
    enableDebugMode();

    final String suiteName = mySuite.getName();

    myTestSuiteStack.pushSuite(createSuiteProxy("0"));
    myTestSuiteStack.pushSuite(mySuite);
    myTestSuiteStack.pushSuite(createSuiteProxy("2"));
    myTestSuiteStack.pushSuite(createSuiteProxy("3"));

    assertEquals(4, myTestSuiteStack.getStackSize());
    assertEquals("3", myTestSuiteStack.getCurrentSuite().getName());

    assertException(
        new AssertionErrorCase() {
          @Override
          public void tryClosure() {
            myTestSuiteStack.popSuite(suiteName);
          }
        });
    assertEquals(4, myTestSuiteStack.getStackSize());
  }
  public void testGetCurrentSuite() {
    assertNull(myTestSuiteStack.getCurrentSuite());

    myTestSuiteStack.pushSuite(mySuite);
    assertEquals(mySuite, myTestSuiteStack.getCurrentSuite());
  }