1717 */
1818package org .biojava .nbio .structure .test .io .density ;
1919
20- import static org .junit .Assert .assertEquals ;
21- import static org .junit .Assert .assertFalse ;
22- import static org .junit .Assert .assertNotNull ;
23- import static org .junit .Assert .assertTrue ;
24- import static org .junit .Assert .fail ;
20+ import static org .junit .jupiter . api . Assertions .assertEquals ;
21+ import static org .junit .jupiter . api . Assertions .assertFalse ;
22+ import static org .junit .jupiter . api . Assertions .assertNotNull ;
23+ import static org .junit .jupiter . api . Assertions .assertTrue ;
24+ import static org .junit .jupiter . api . Assertions .fail ;
2525
2626import java .io .File ;
2727import java .io .IOException ;
3939import org .biojava .nbio .structure .io .density .DensityMapResult ;
4040import org .biojava .nbio .structure .io .density .DensityMapSource ;
4141import org .biojava .nbio .structure .io .density .NoDensityMapException ;
42- import org .junit .After ;
43- import org .junit .Before ;
44- import org .junit .Test ;
42+ import org .junit .jupiter . api . AfterEach ;
43+ import org .junit .jupiter . api . BeforeEach ;
44+ import org .junit .jupiter . api . Test ;
4545
4646/**
4747 * Density fetching against the real services.
@@ -60,13 +60,13 @@ public class DensityMapIntegrationTest {
6060 private File cacheRoot ;
6161 private DensityMapCache cache ;
6262
63- @ Before
63+ @ BeforeEach
6464 public void setUp () throws IOException {
6565 cacheRoot = Files .createTempDirectory ("bj-density-it" ).toFile ();
6666 cache = new DensityMapCache (cacheRoot .getAbsolutePath ());
6767 }
6868
69- @ After
69+ @ AfterEach
7070 public void tearDown () throws IOException {
7171 FileDownloadUtils .deleteDirectory (cacheRoot .toPath ());
7272 }
@@ -81,8 +81,8 @@ public void fetchesAnXrayMapFromTheFirstSourceTried() throws IOException {
8181 assertTrue (result .isRenderable ());
8282 assertFalse (result .isFromCache ());
8383 assertTrue (result .getFileSizeBytes () > 1024 );
84- assertTrue ("a .meta sidecar makes the result reconstructible offline" ,
85- DensityMapResult . metaFileFor ( result . getFile ()). isFile () );
84+ assertTrue (DensityMapResult . metaFileFor ( result . getFile ()). isFile () ,
85+ "a .meta sidecar makes the result reconstructible offline" );
8686
8787 // second call must come from the cache without another download
8888 DensityMapResult again = cache .getDensityMap (new PdbId ("1cbs" ), DensityMapKind .TWO_FO_FC );
@@ -100,11 +100,11 @@ public void bothKindsShareASingleDownload() throws IOException {
100100 DensityMapResult foFc = cache .getDensityMap (new PdbId ("1cbs" ), DensityMapKind .FO_FC );
101101
102102 assertEquals (DensityMapKind .FO_FC , foFc .getKind ());
103- assertFalse ("the difference map needs its own file name" , twoFoFc . getFile (). equals ( foFc . getFile ()) );
104- assertTrue ("the marker has to be in the name for Jmol to select the FO-FC block" ,
105- foFc . getFile (). getName (). contains ( "&diff=1" ) );
106- assertEquals ("both names must address the same bytes" ,
107- twoFoFc . getFileSizeBytes (), foFc . getFileSizeBytes () );
103+ assertFalse (twoFoFc . getFile (). equals ( foFc . getFile ()), "the difference map needs its own file name" );
104+ assertTrue (foFc . getFile (). getName (). contains ( "&diff=1" ) ,
105+ "the marker has to be in the name for Jmol to select the FO-FC block" );
106+ assertEquals (twoFoFc . getFileSizeBytes (), foFc . getFileSizeBytes () ,
107+ "both names must address the same bytes" );
108108 }
109109
110110 /** PDBe serves real CCP4 files, which the header check should recognise. */
@@ -115,7 +115,7 @@ public void pdbeServesAGenuineCcp4Map() throws IOException {
115115
116116 assertEquals (DensityMapSource .PDBE_CCP4 , result .getSource ());
117117 assertEquals (DensityFileFormat .CCP4 , result .getFormat ());
118- assertTrue ("the CCP4 stamp should be present at byte 208" , Ccp4Header . isCcp4 ( result . getFile ()) );
118+ assertTrue (Ccp4Header . isCcp4 ( result . getFile ()), "the CCP4 stamp should be present at byte 208" );
119119 assertTrue (FileDownloadUtils .validateFile (result .getFile ()));
120120 }
121121
@@ -131,8 +131,8 @@ public void resolvesCryoEmEntriesAndHonoursTheSizeLimit() throws IOException {
131131 DensityMapResult result = cache .getDensityMap (new PdbId ("6hu9" ), DensityMapKind .AUTO );
132132 assertEquals (DensityMapKind .EM , result .getKind ());
133133 assertEquals ("EMD-0262" , result .getEmdbId ());
134- assertNotNull ("EM maps need the author contour level to be displayed properly" ,
135- result . getRecommendedContourLevel () );
134+ assertNotNull (result . getRecommendedContourLevel () ,
135+ "EM maps need the author contour level to be displayed properly" );
136136 assertEquals (0.0263 , result .getRecommendedContourLevel (), 1e-6 );
137137 assertNotNull (result .getContourInSigma ());
138138
@@ -177,11 +177,11 @@ public void mapCoefficientsArriveWithAVerifiableChecksum() throws IOException {
177177 .build ());
178178
179179 assertEquals (DensityMapSource .WWPDB_MAP_COEFFICIENTS , result .getSource ());
180- assertFalse ("structure factors are not a map and must not claim to be renderable" ,
181- result . isRenderable () );
180+ assertFalse (result . isRenderable () ,
181+ "structure factors are not a map and must not claim to be renderable" );
182182
183183 File hashFile = new File (result .getFile ().getParentFile (), result .getFile ().getName () + ".hash_MD5" );
184- assertTrue ("an MD5 should have been recorded from the ETag" , hashFile . isFile () );
184+ assertTrue (hashFile . isFile (), "an MD5 should have been recorded from the ETag" );
185185 assertTrue (FileDownloadUtils .validateFile (result .getFile ()));
186186
187187 // corrupt it and confirm the checksum actually catches it
0 commit comments