Hi,

I have a problem, I have written a class, inside another class. No problem with that, but I have now come to develop a unit test for the outer class. The JUnit must be able to test the methods of the inner class as well as all other class methods. However, I can not seem to access the methods, or even reference the class.

Please can someone point me in the correct direction.

Thanks

Why do you need to write tests that don't adhere to the access scope of the inner class? If it's not a static inner class, you should have an instance of the enclosing class to work from. If that's not the case, then perhaps your inner class should actually be a public top-level class?

Hi there, the class functions perfectly, and the app as well. the class was made for the sol purpose of that JFrame, as such it was easier to make it a nested class.

However, I have now solved the problem. Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.