Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

JUnit test for inner static class

$
0
0

I have a testing class like this:

 

<code>

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ClassOuterTest {
   @Test
   public void testOuter() {
      assertEquals(1, 0, 0);
   }

   public static class ClassInnerTest {
      @Test
      public void testInner() {
         assertEquals(1, 0, 0);
      }
   }
}
</code>

 

Right now the inner class test is not run when the outer class test is called via Run/Debug. Is there a possibility to force this by Configuration/Annotation or do I have to create a run target for this inner class separately?


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>