Search in sources :

Example 6 with AssertionErrorCase

use of com.intellij.testFramework.exceptionCases.AssertionErrorCase in project intellij-community by JetBrains.

the class TestSuiteStackTest method testPopInconsistentSuite_DebugMode.

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());
}
Also used : AssertionErrorCase(com.intellij.testFramework.exceptionCases.AssertionErrorCase)

Aggregations

AssertionErrorCase (com.intellij.testFramework.exceptionCases.AssertionErrorCase)6 PsiFile (com.intellij.psi.PsiFile)2 GoFile (com.goide.psi.GoFile)1 GoPackageClause (com.goide.psi.GoPackageClause)1