Allow NewTestNGClassWizardPage to generate files ending in .scala

Open Beginner friendly
#189 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
java, scala
Domain
tooling

Research direction

Open NewTestNGClassWizardPage.java and read lines 256-257, where the generated filename is checked; that validation is what rejects the .scala suffix the wizard itself proposes. Trace the validation method and any sibling checks for file extensions, and update them to accept Scala test class names as well as .java. Done means the wizard accepts the name it generates for a selected Scala class; verify by exercising the New TestNG Class wizard in an Eclipse instance, since the payload names no test file.

Written by the indexing model from the issue text.

Description

When creating a new TestNG class after having selected a scala class this process seems to work fine, such as selecting the methods to test. When I get to define the name and path to the new file, the wizard puts Something.scalaTest as the filename, which the current code doesn't allow.

Line 256-257 in NewTestNGClassWizardPage.java should allow for new Scala test classes that end in .scala, not just .java files.

Dominant language
Java
Stars
198
Forks
163
Avg merge
4m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testng-team/testng-eclipse

All issues in testng-team/testng-eclipse

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.