EgorKulikov / idea-chelper

Automatically exported from code.google.com/p/idea-chelper
112 stars 58 forks source link

Test case location doesn't match #66

Open ntviet18 opened 6 years ago

ntviet18 commented 6 years ago

Hi @EgorKulikov , When I create a new test case with name, e.g. PokupkaBiletovTestCase, it will be created with the same name and located at the task package, e.g. com.example. However, when I run the task it will complain

Exception in thread "main" java.lang.ClassNotFoundException: PokupkaBiletovTestCase
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at net.egork.chelper.tester.NewTester.test(NewTester.java:58)
    at net.egork.chelper.tester.NewTester.main(NewTester.java:28)

I can fix this by adding the full qualified class name, e.g. com.example.PokupkaBiletovTestCase to the task specification.

But next time when I create a test with name com.example.MarshrutTestCase, it will create a file named com.example.MarshrutTestCase.java in package com.example.

Do we have any other way to automatically configure it, rather than changing testDirectory?

EgorKulikov commented 6 years ago

It is interesting Test directory had nothing to do with this, it is for unit test that are created automatically upon task archivation. Is there any chance that you can record a screencast of what you are doing?

ntviet18 commented 6 years ago

@EgorKulikov , Thank you for you quick reply. Please see the screencast here

EgorKulikov commented 6 years ago

I found the bug, it will be fixed in next beta

ntviet18 commented 6 years ago

@EgorKulikov , thank you very much