** Looks like this org.junit.jupiter release is not quite compatible with
SpringBootTest. **
I use Netbeans 11.3 and despite the online tutorial vis-à-vis "Creating JUnit
Test" from the NB IDE, the support for the org.junit.jupiter libraries are not
completely functional yet. I hope this is addressed in the NB 12 beta version.
On Tuesday, May 19, 2020, 3:31:54 AM GMT+4:30, HRH
<[email protected]> wrote:
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
<[email protected]> wrote:
#yiv5064222178 -- filtered {}#yiv5064222178 filtered {}#yiv5064222178 filtered
{}#yiv5064222178 filtered {}#yiv5064222178 filtered {}#yiv5064222178
p.yiv5064222178MsoNormal, #yiv5064222178 li.yiv5064222178MsoNormal,
#yiv5064222178 div.yiv5064222178MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:New
serif;}#yiv5064222178 a:link, #yiv5064222178 span.yiv5064222178MsoHyperlink
{color:blue;text-decoration:underline;}#yiv5064222178 a:visited, #yiv5064222178
span.yiv5064222178MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}#yiv5064222178
p.yiv5064222178msonormal0, #yiv5064222178 li.yiv5064222178msonormal0,
#yiv5064222178 div.yiv5064222178msonormal0
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:New
serif;}#yiv5064222178 p.yiv5064222178msonormal, #yiv5064222178
li.yiv5064222178msonormal, #yiv5064222178 div.yiv5064222178msonormal
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:New
serif;}#yiv5064222178 p.yiv5064222178msochpdefault, #yiv5064222178
li.yiv5064222178msochpdefault, #yiv5064222178 div.yiv5064222178msochpdefault
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:New
serif;}#yiv5064222178 span.yiv5064222178msohyperlink {}#yiv5064222178
span.yiv5064222178msohyperlinkfollowed {}#yiv5064222178
span.yiv5064222178emailstyle17 {}#yiv5064222178 p.yiv5064222178msonormal1,
#yiv5064222178 li.yiv5064222178msonormal1, #yiv5064222178
div.yiv5064222178msonormal1
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv5064222178
span.yiv5064222178msohyperlink1
{color:#0563C1;text-decoration:underline;}#yiv5064222178
span.yiv5064222178msohyperlinkfollowed1
{color:#954F72;text-decoration:underline;}#yiv5064222178
span.yiv5064222178emailstyle171
{font-family:sans-serif;color:windowtext;}#yiv5064222178
p.yiv5064222178msochpdefault1, #yiv5064222178 li.yiv5064222178msochpdefault1,
#yiv5064222178 div.yiv5064222178msochpdefault1
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:sans-serif;}#yiv5064222178
span.yiv5064222178EmailStyle28
{font-family:sans-serif;color:#1F497D;}#yiv5064222178
.yiv5064222178MsoChpDefault {font-size:10.0pt;}#yiv5064222178 filtered
{}#yiv5064222178 div.yiv5064222178WordSection1 {}#yiv5064222178
Sure, Here is the whole test file attached.
Gary GreenbergError
Staff Software Engineer
Data Product Development, BI-A
E: [email protected]
M: 650-269-7902
From: HRH <[email protected]>
Sent: Monday, May 18, 2020 3:30 PM
To: [email protected]; Greenberg, Gary <[email protected]>
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
<[email protected]> 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
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:[email protected]
M: 650-269-7902
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
MetricEvaluatorTest.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
