Does JUnit supports Nested Innerclasses
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Sunday, December 28, 2008 11:14 AM

Hi, I want to know whether JUnit supports Nested Inner classes or not. Sample: import org.junit.runners.*; import org.junit.runner.*; import org.junit.*; import static org.junit.Assert.*; @RunWith(value=Enclosed.class) //I think enclosed runner doesn't run nested Inner classes. public class J41Innerclass{ ....................................... public static class publicstaticInnerclass { ................................... public static class publicstaticNestedInnerclass //I want to run this Nested inner class Test methods.    More>>

Hi,


I want to know whether JUnit supports Nested Inner classes or not.




Sample:


import org.junit.runners.*;

import org.junit.runner.*;

import org.junit.*;

import static org.junit.Assert.*;


@RunWith(value=Enclosed.class)

//I think enclosed runner doesn't run nested Inner classes.

public class J41Innerclass{


.......................................

public static class publicstaticInnerclass

{

...................................

public static class publicstaticNestedInnerclass

//I want to run this Nested inner class Test methods.

{

...........................................

}

}

}




Questions:


1.Does JUnit supports Nested Inner classes?If Yes,then how can i run Test methods in nested inner class "publicstaticNestedInnerclass" in the above sample?


2.What is the neccessity for using nested inner classes in JUnit TestCases.?

   <<Less
About | Sitemap | Contact