Re: Non-public Unit Tests

2022-09-08 Thread Martin Desruisseaux
About Netbeans underlining a method name and saying "myMethod is never 
used", I have the same problem when overriding a package-private method:


public class A {
void myMethod() {...}

public void doStuff() {
myMethod();
}
}

class B extends A {
@Override
void myMethod() {...}
}

NetBeans hints myMethod() in class B as never used. Indeed there is no 
explicit calls to B.myMethod(), but that method is still used when 
A.myMethod() is invoked.


    Martin



Re: Non-public Unit Tests

2022-09-08 Thread Ulrich Mayring

I'm using JUnit 5. The tests are picked up fine.

Am 08.09.22 um 17:49 schrieb Alonso Del Arte:
Is NetBeans still incapable of using JUnit 5? The JUnit 4 test runner 
does not pick up non-public tests, so then the indication that the test 
is not used is perfectly correct.


Al

On Thu, Sep 8, 2022 at 11:23 AM Ulrich Mayring > wrote:


When I define a package-private unit test like:

@Test
void myMethod() { ... }

then Netbeans underlines the method name and hints "myMethod is
never used".

If I define the test method to be public, this hint is not displayed.

In a way this is logical behavior, but I wonder whether it is useful.
Perhaps a unit test or even any other test should be recognized to be
"top level methods", even if they are package private.

Any opinions on this?

Ulrich

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org

For additional commands, e-mail: users-h...@netbeans.apache.org


For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




--
Alonso del Arte
Author at SmashWords.com 


Musician at ReverbNation.com 


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: Non-public Unit Tests

2022-09-08 Thread Alonso Del Arte
Is NetBeans still incapable of using JUnit 5? The JUnit 4 test runner does
not pick up non-public tests, so then the indication that the test is not
used is perfectly correct.

Al

On Thu, Sep 8, 2022 at 11:23 AM Ulrich Mayring 
wrote:

> When I define a package-private unit test like:
>
> @Test
> void myMethod() { ... }
>
> then Netbeans underlines the method name and hints "myMethod is never
> used".
>
> If I define the test method to be public, this hint is not displayed.
>
> In a way this is logical behavior, but I wonder whether it is useful.
> Perhaps a unit test or even any other test should be recognized to be
> "top level methods", even if they are package private.
>
> Any opinions on this?
>
> Ulrich
>
> -
> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: users-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

-- 
Alonso del Arte
Author at SmashWords.com

Musician at ReverbNation.com 


Non-public Unit Tests

2022-09-08 Thread Ulrich Mayring

When I define a package-private unit test like:

@Test
void myMethod() { ... }

then Netbeans underlines the method name and hints "myMethod is never used".

If I define the test method to be public, this hint is not displayed.

In a way this is logical behavior, but I wonder whether it is useful. 
Perhaps a unit test or even any other test should be recognized to be 
"top level methods", even if they are package private.


Any opinions on this?

Ulrich

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



NetBeans 15. Impossible to create a Maven Web application for Jakarta EE 9.1

2022-09-08 Thread Richard Grin

Hello,

I have just downloaded and installed NetBeans 15 on Windows 11.

I can't create a Java with Maven - Web Application, Server GlassFish 
Server 6.2.5, Jakarta EE 9.1.


I launch NetBeans 15

Menu File > New Project > Java with Maven > Web Application.

Server: GlassFish Server 6.2.5
Java EE Version: Jakarta EE 9.1 Web.

Click on Finish.

In the Notifications Zone, an "Unexpected Exception" appears. The error 
message:


java.lang.IllegalStateException: No archetype defined for profile 
9.1-web in class 
org.netbeans.modules.maven.j2ee.ui.wizard.archetype.J2eeArchetypeFactory$WebArchetypes; 
check whether all possible  pairs have been added
    at 
org.netbeans.modules.maven.j2ee.ui.wizard.archetype.BaseJ2eeArchetypeProvider.getArchetypeFor(BaseJ2eeArchetypeProvider.java:135)
    at 
org.netbeans.modules.maven.j2ee.ui.wizard.archetype.J2eeArchetypeFactory.findArchetypeFor(J2eeArchetypeFactory.java:79)
    at 
org.netbeans.modules.maven.j2ee.ui.wizard.EEWizardIterator.instantiate(EEWizardIterator.java:102) 


    at ...
    ...

Notice that the creation of a Jakarta EE *8* Web application works.

Regards,

Richard


-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists