git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1270 JUnit to TestNG refactoring
[jalview.git]
/
test
/
jalview
/
io
/
BioJsHTMLOutputTest.java
diff --git
a/test/jalview/io/BioJsHTMLOutputTest.java
b/test/jalview/io/BioJsHTMLOutputTest.java
index
ac2b599
..
619a4e0
100644
(file)
--- a/
test/jalview/io/BioJsHTMLOutputTest.java
+++ b/
test/jalview/io/BioJsHTMLOutputTest.java
@@
-1,8
+1,5
@@
package jalview.io;
package jalview.io;
-import jalview.json.binding.v1.BioJSReleasePojo;
-import jalview.json.binding.v1.BioJSRepositoryPojo;
-
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
@@
-11,8
+8,12
@@
import java.net.URL;
import java.net.URLConnection;
import java.util.TreeMap;
import java.net.URLConnection;
import java.util.TreeMap;
-import org.junit.Assert;
-import org.junit.Test;
+import org.testng.Assert;
+import org.testng.AssertJUnit;
+import org.testng.annotations.Test;
+
+import jalview.json.binding.v1.BioJSReleasePojo;
+import jalview.json.binding.v1.BioJSRepositoryPojo;
public class BioJsHTMLOutputTest
public class BioJsHTMLOutputTest
@@
-43,7
+44,7
@@
public class BioJsHTMLOutputTest
Assert.assertNotNull(bjsTemplate);
}
Assert.assertNotNull(bjsTemplate);
}
- @Test(expected = NullPointerException.class)
+ @Test(expectedExceptions = NullPointerException.class)
public void expectedNullPointerException()
{
try
public void expectedNullPointerException()
{
try
@@
-51,7
+52,7
@@
public class BioJsHTMLOutputTest
BioJsHTMLOutput.refreshBioJSVersionsInfo(null);
} catch (URISyntaxException e)
{
BioJsHTMLOutput.refreshBioJSVersionsInfo(null);
} catch (URISyntaxException e)
{
- Assert.fail("Expception occured while testing!");
+ AssertJUnit.fail("Expception occured while testing!");
e.printStackTrace();
}
}
e.printStackTrace();
}
}
@@
-67,11
+68,11
@@
public class BioJsHTMLOutputTest
versions = BioJsHTMLOutput.getBioJsMSAVersions();
} catch (URISyntaxException e)
{
versions = BioJsHTMLOutput.getBioJsMSAVersions();
} catch (URISyntaxException e)
{
- Assert.fail("Expception occured while testing!");
+ AssertJUnit.fail("Expception occured while testing!");
e.printStackTrace();
}
e.printStackTrace();
}
- Assert.assertNotNull("No versions found", versions);
- Assert.assertTrue("One or more Templates required", versions.size() > 0);
+ AssertJUnit.assertNotNull("No versions found", versions);
+ AssertJUnit.assertTrue("One or more Templates required", versions.size() > 0);
System.out
.println("Number of discovered versions : "
+ versions.size());
System.out
.println("Number of discovered versions : "
+ versions.size());
@@
-83,7
+84,7
@@
public class BioJsHTMLOutputTest
System.out.println("\nCurrent latest version : "
+ BioJsHTMLOutput.getCurrentBJSTemplateFile());
System.out.println("\nCurrent latest version : "
+ BioJsHTMLOutput.getCurrentBJSTemplateFile());
- Assert.assertNotNull("Latest BioJsMSA version NOT found!",
+ AssertJUnit.assertNotNull("Latest BioJsMSA version NOT found!",
BioJsHTMLOutput.getCurrentBJSTemplateFile());
}
BioJsHTMLOutput.getCurrentBJSTemplateFile());
}
@@
-92,9
+93,9
@@
public class BioJsHTMLOutputTest
public void testBioJsUpdate()
{
String url = BioJsHTMLOutput.BJS_TEMPLATE_GIT_REPO;
public void testBioJsUpdate()
{
String url = BioJsHTMLOutput.BJS_TEMPLATE_GIT_REPO;
- Assert.assertTrue("URL not reacable : " + url, urlIsReachable(url));
+ AssertJUnit.assertTrue("URL not reacable : " + url, urlIsReachable(url));
String response = BioJsHTMLOutput.getURLContentAsString(url);
String response = BioJsHTMLOutput.getURLContentAsString(url);
- Assert.assertNotNull("Null response read from url!", response);
+ AssertJUnit.assertNotNull("Null response read from url!", response);
BioJSRepositoryPojo repository = new BioJSRepositoryPojo(response);
System.out.println(">>> description : " + repository.getDescription());
System.out
BioJSRepositoryPojo repository = new BioJSRepositoryPojo(response);
System.out.println(">>> description : " + repository.getDescription());
System.out