I'm trying to integrate assertJ-swing to a NetBeans project with no Maven. So I downloaded assertj-swing-3.8.0.jar from http://repo1.maven.org/maven2/org/assertj/assertj-swing/3.8.0/ and added it as a Library to NetBeans.
In the test main() I execute my application using:
org.assertj.swing.launcher.ApplicationLauncher.application(STInt_Client.class).start();
and the application fires off correctly. The application pops up 2 JDialog boxes and after pressing OK on both, it creates a new JFrame and calls setVisible(true)
on it.
In my test I want to locate that frame programatically, so I do:
FrameFixture chooseModeFrame = findFrame("Frame_ChooseMode").withTimeout(10000).using(robot());
Frame_ChooseMode is the name of the JFrame class. But this line throws an exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/assertj/core/util/Preconditions
at org.assertj.swing.core.NameMatcher.<init>(NameMatcher.java:83)
at org.assertj.swing.finder.ComponentFinderTemplate.<init>(ComponentFinderTemplate.java:57)
at org.assertj.swing.finder.WindowFinderTemplate.<init>(WindowFinderTemplate.java:42)
at org.assertj.swing.finder.FrameFinder.<init>(FrameFinder.java:40)
at org.assertj.swing.finder.WindowFinder.findFrame(WindowFinder.java:85)
at com.stinternational.client.test.Test_GUI.main(Test_GUI.java:107)
Test_GUID.java:107 is my call to findFrame()
. Any idea what why this exception is thrown? Thank you in advance.