Using Mockito with Netbeans

2024-02-28 Thread Greenberg, Gary
I am quite used to generate unit tests for my code using Netbeans 
Tools->Create/Update Tests. JUnit is great.
However, now I need to create tests for some DAO classes where I will need to 
mock database access.
I plan to use Mockito for that.  Does Netbeans have any features automating 
Mockito test creation?


Gary Greenberg

Staff Software Engineer




Re: Netbeans 21 always showing wrong Java dependency for Maven project

2024-02-28 Thread Francesco Chicchiriccò
Hi Michael,
thanks for your answer.

On 2024/02/28 14:40:34 Michael Bien wrote:
> Hi,
> 
> On 28.02.24 11:23, Francesco Chicchiriccò wrote:
> > Hi there,
> > I am using Netbeans since 6.0 and still enjoying it as main 
> > development platform for Java: nice job!
> >
> > I am experiencing an annoying behavior with Maven projects: even 
> > though JDK 21 is correctly reported under project properties -> 
> > sources -> source/binary format and also under build -> compile (as 
> > set by Maven's pom.xml), Netbeans keeps showing JDK 11 under Java 
> > dependencies.
> 
> I can reproduce this, switching JDKs doesn't update the tree under "Java 
> Dependencies". Reopening the project or restarting NB does fix it - so 
> this looks like a (UI only?) bug, however:
> 
> 
> > The unwanted consequence of this is that I can only browse JDK 11 
> > sources when CTRL + clicking on my project's sources.
> 
> this I can't reproduce. It always navigated to the right JDK sources. 
> Building/running the project does also use the JDK selected in project 
> properties.
> 
> If you create a brand new maven project using the standard template, 
> does the same problem occur?

I confirm that with a brand new maven project it navigates to the JDK sources 
as defined in project properties.

This issue is occurring to me with Apache Syncope sources, for any of the 
submodules - maybe because it is multi-module or because it defines some 
properties / plugins that are interfering?

FTR I was able to finally browse JDK 21 sources after setting back to "JDK 21 
(Default)" the configuration under Tools -> Java -> Maven -> Default JDK

Regards.

> > I have both platforms correctly defined, including sources.
> > Netbeans itself runs on JDK 21.
> >
> > What could be the issue? TIA
> > Regards.

-
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: Netbeans 21 always showing wrong Java dependency for Maven project

2024-02-28 Thread Michael Bien

Hi,

On 28.02.24 11:23, Francesco Chicchiriccò wrote:

Hi there,
I am using Netbeans since 6.0 and still enjoying it as main 
development platform for Java: nice job!


I am experiencing an annoying behavior with Maven projects: even 
though JDK 21 is correctly reported under project properties -> 
sources -> source/binary format and also under build -> compile (as 
set by Maven's pom.xml), Netbeans keeps showing JDK 11 under Java 
dependencies.


I can reproduce this, switching JDKs doesn't update the tree under "Java 
Dependencies". Reopening the project or restarting NB does fix it - so 
this looks like a (UI only?) bug, however:



The unwanted consequence of this is that I can only browse JDK 11 
sources when CTRL + clicking on my project's sources.


this I can't reproduce. It always navigated to the right JDK sources. 
Building/running the project does also use the JDK selected in project 
properties.


If you create a brand new maven project using the standard template, 
does the same problem occur?


-mbien




I have both platforms correctly defined, including sources.
Netbeans itself runs on JDK 21.

What could be the issue? TIA
Regards.




-
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 21 always showing wrong Java dependency for Maven project

2024-02-28 Thread Francesco Chicchiriccò

Hi there,
I am using Netbeans since 6.0 and still enjoying it as main development 
platform for Java: nice job!

I am experiencing an annoying behavior with Maven projects: even though JDK 21 is 
correctly reported under project properties -> sources -> source/binary format and 
also under build -> compile (as set by Maven's pom.xml), Netbeans keeps showing JDK 
11 under Java dependencies.
The unwanted consequence of this is that I can only browse JDK 11 sources when 
CTRL + clicking on my project's sources.

I have both platforms correctly defined, including sources.
Netbeans itself runs on JDK 21.

What could be the issue? TIA
Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


-
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