Thank you very much.
It does work. My test have succeeded.
Looks like this org.junit.jupiter release is not quite compatible with 
SpringBootTest.

Gary Greenberg
Staff Software Engineer
Data Product Development, BI-A
E: ggree...@visa.com
M: 650-269-7902

[EmailSig-TaglineVersion]

From: HRH <hrh...@yahoo.com.INVALID>
Sent: Monday, May 18, 2020 4:02 PM
To: users@netbeans.apache.org; Greenberg, Gary <ggree...@visa.com.INVALID>
Subject: Re: Strange JUnit behavior

I had a similar problem and this was the fix. Perhaps, it may work for you as 
well:

Comment out the following import statments:

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
import org.junit.jupiter.api.Test;

Add these instead:

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

Ultimately, the annotations should be used as follow:

    @BeforeClass
    public static void setUpClass() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }
Hope this helps.



On Tuesday, May 19, 2020, 3:20:25 AM GMT+4:30, Greenberg, Gary 
<ggree...@visa.com.invalid<mailto:ggree...@visa.com.invalid>> wrote:



Sure, Here is the whole test file attached.



Gary GreenbergError

Staff Software Engineer

Data Product Development, BI-A

E: ggree...@visa.com<mailto:ggree...@visa.com>

M: 650-269-7902



[EmailSig-TaglineVersion]



From: HRH <hrh...@yahoo.com.INVALID<mailto:hrh...@yahoo.com.INVALID>>
Sent: Monday, May 18, 2020 3:30 PM
To: users@netbeans.apache.org<mailto:users@netbeans.apache.org>; Greenberg, 
Gary <ggree...@visa.com.INVALID<mailto:ggree...@visa.com.INVALID>>
Subject: Re: Strange JUnit behavior



Can you post the import statments used in your test file?



On Tuesday, May 19, 2020, 2:54:47 AM GMT+4:30, Greenberg, Gary 
<ggree...@visa.com.invalid<mailto:ggree...@visa.com.invalid>> wrote:





I have created a Junit test for one of my classes using Netbeans 
Tools->Create/Update Tests menu.

My class has just a single public method, therefore, test class contains only 
one @Test method.

I did edited it to reflect my functionality, but when I run this test file I am 
getting

[cid:image002.png@01D62D2F.203EFCC0]

Where these two erroneous tests are coming from, is a secret for me.

If someone can give me a clue, how to find why I am getting these errors and 
how to get rid of them,
I will appreciate it greatly.

Thanks,

Gary Greenberg

Staff Software Engineer

Data Product Development, BI-A

E: ggree...@visa.com<mailto:ggree...@visa.com>

M: 650-269-7902



[EmailSig-TaglineVersion]



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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&data=02%7C01%7Cggreenbe%40visa.com%7Ca2a436a812ee4684789808d7fb7f7911%7C38305e12e15d4ee888b9c4db1c477d76%7C0%7C1%7C637254397251821981&sdata=fY1rCGjI1YshFwREfIa%2BxP4xDm1jRiL6nkAoBJwqo1E%3D&reserved=0>

Reply via email to