@@ -19,7 +19,7 @@ public class APITest {
1919
2020 private final IPFS ipfs = new IPFS (new MultiAddress ("/ip4/127.0.0.1/tcp/5001" ));
2121
22- @ org . junit . Test
22+ @ Test
2323 public void dag () throws IOException {
2424 byte [] object = "{\" data\" :1234}" .getBytes ();
2525 MerkleNode put = ipfs .dag .put ("json" , object );
@@ -33,7 +33,7 @@ public void dag() throws IOException {
3333 Assert .assertTrue ("Raw data equal" , Arrays .equals (object , get ));
3434 }
3535
36- @ org . junit . Test
36+ @ Test
3737 public void dagCbor () throws IOException {
3838 Map <String , CborObject > tmp = new TreeMap <>();
3939 tmp .put ("data" , new CborObject .CborByteArray ("G'day mate!" .getBytes ()));
@@ -76,21 +76,21 @@ public void ipldNode() {
7676 Assert .assertTrue ("Correct tree" , tree .equals (Arrays .asList ("/a/b" , "/c" )));
7777 }
7878
79- @ org . junit . Test
79+ @ Test
8080 public void singleFileTest () {
8181 NamedStreamable .ByteArrayWrapper file = new NamedStreamable .ByteArrayWrapper ("hello.txt" , "G'day world! IPFS rocks!" .getBytes ());
8282 fileTest (file );
8383 }
8484
85- @ org . junit . Test
85+ @ Test
8686 public void dirTest () throws IOException {
8787 NamedStreamable .DirWrapper dir = new NamedStreamable .DirWrapper ("root" , Arrays .asList ());
8888 MerkleNode addResult = ipfs .add (dir );
8989 List <MerkleNode > ls = ipfs .ls (addResult .hash );
9090 Assert .assertTrue (ls .size () > 0 );
9191 }
9292
93- @ org . junit . Test
93+ @ Test
9494 public void directoryTest () throws IOException {
9595 Random rnd = new Random ();
9696 String dirName = "folder" + rnd .nextInt (100 );
@@ -130,15 +130,15 @@ public void directoryTest() throws IOException {
130130 throw new IllegalStateException ("Different contents!" );
131131 }
132132
133- // @org.junit. Test
133+ // @Test
134134 public void largeFileTest () {
135135 byte [] largerData = new byte [100 *1024 *1024 ];
136136 new Random (1 ).nextBytes (largerData );
137137 NamedStreamable .ByteArrayWrapper largeFile = new NamedStreamable .ByteArrayWrapper ("nontrivial.txt" , largerData );
138138 fileTest (largeFile );
139139 }
140140
141- // @org.junit. Test
141+ // @Test
142142 public void hugeFileStreamTest () {
143143 byte [] hugeData = new byte [1000 *1024 *1024 ];
144144 new Random (1 ).nextBytes (hugeData );
@@ -166,7 +166,7 @@ public void hugeFileStreamTest() {
166166 }
167167 }
168168
169- @ org . junit . Test
169+ @ Test
170170 public void hostFileTest () throws IOException {
171171 Path tempFile = Files .createTempFile ("IPFS" , "tmp" );
172172 BufferedWriter w = new BufferedWriter (new FileWriter (tempFile .toFile ()));
@@ -193,7 +193,7 @@ public void fileTest(NamedStreamable file) {
193193 }
194194 }
195195
196- @ org . junit . Test
196+ @ Test
197197 public void pinTest () {
198198 try {
199199 MerkleNode file = ipfs .add (new NamedStreamable .ByteArrayWrapper ("some data" .getBytes ()));
@@ -217,7 +217,7 @@ public void pinTest() {
217217 }
218218 }
219219
220- @ org . junit . Test
220+ @ Test
221221 public void pinUpdate () {
222222 try {
223223 MerkleNode child1 = ipfs .add (new NamedStreamable .ByteArrayWrapper ("some data" .getBytes ()));
@@ -248,7 +248,7 @@ public void pinUpdate() {
248248 }
249249 }
250250
251- @ org . junit . Test
251+ @ Test
252252 public void rawLeafNodePinUpdate () {
253253 try {
254254 MerkleNode child1 = ipfs .block .put ("some data" .getBytes (), Optional .of ("raw" ));
@@ -275,7 +275,7 @@ public void rawLeafNodePinUpdate() {
275275 }
276276 }
277277
278- @ org . junit . Test
278+ @ Test
279279 public void indirectPinTest () {
280280 try {
281281 Multihash EMPTY = ipfs .object ._new (Optional .empty ()).hash ;
@@ -306,7 +306,7 @@ public void indirectPinTest() {
306306 }
307307}
308308
309- @ org . junit . Test
309+ @ Test
310310 public void objectPatch () {
311311 try {
312312 MerkleNode obj = ipfs .object ._new (Optional .empty ());
@@ -343,7 +343,7 @@ public void objectPatch() {
343343 }
344344 }
345345
346- @ org . junit . Test
346+ @ Test
347347 public void refsTest () {
348348 try {
349349 List <Multihash > local = ipfs .refs .local ();
@@ -355,7 +355,7 @@ public void refsTest() {
355355 }
356356 }
357357
358- @ org . junit . Test
358+ @ Test
359359 public void objectTest () {
360360 try {
361361 MerkleNode _new = ipfs .object ._new (Optional .empty ());
@@ -371,7 +371,7 @@ public void objectTest() {
371371 }
372372 }
373373
374- @ org . junit . Test
374+ @ Test
375375 public void blockTest () {
376376 try {
377377 MerkleNode pointer = new MerkleNode ("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB" );
@@ -383,7 +383,7 @@ public void blockTest() {
383383 }
384384 }
385385
386- @ org . junit . Test
386+ @ Test
387387 public void bulkBlockTest () {
388388 try {
389389 CborObject cbor = new CborObject .CborString ("G'day IPFS!" );
@@ -421,7 +421,7 @@ private static String toEscapedHex(byte[] in) throws IOException {
421421 /**
422422 * Test that merkle links in values of a cbor map are followed during recursive pins
423423 */
424- @ org . junit . Test
424+ @ Test
425425 public void merkleLinkInMap () {
426426 try {
427427 Random r = new Random ();
@@ -457,7 +457,7 @@ public void merkleLinkInMap() {
457457 }
458458 }
459459
460- @ org . junit . Test
460+ @ Test
461461 public void recursiveRefs () {
462462 try {
463463 CborObject .CborByteArray leaf1 = new CborObject .CborByteArray (("G'day IPFS!" ).getBytes ());
@@ -498,7 +498,7 @@ public void recursiveRefs() {
498498 /**
499499 * Test that merkle links as a root object are followed during recursive pins
500500 */
501- @ org . junit . Test
501+ @ Test
502502 public void rootMerkleLink () {
503503 try {
504504 Random r = new Random ();
@@ -531,9 +531,9 @@ public void rootMerkleLink() {
531531 }
532532
533533 /**
534- * Test that merkle links as a root object are followed during recursive pins
534+ * Test that a cbor null is allowed as an object root
535535 */
536- @ org . junit . Test
536+ @ Test
537537 public void rootNull () {
538538 try {
539539 CborObject .CborNull cbor = new CborObject .CborNull ();
@@ -557,7 +557,7 @@ public void rootNull() {
557557 /**
558558 * Test that merkle links in a cbor list are followed during recursive pins
559559 */
560- @ org . junit . Test
560+ @ Test
561561 public void merkleLinkInList () {
562562 try {
563563 Random r = new Random ();
@@ -585,7 +585,7 @@ public void merkleLinkInList() {
585585 }
586586 }
587587
588- @ org . junit . Test
588+ @ Test
589589 public void fileContentsTest () {
590590 try {
591591 ipfs .repo .gc ();
@@ -601,7 +601,7 @@ public void fileContentsTest() {
601601 }
602602 }
603603
604- @ org . junit . Test
604+ @ Test
605605 public void nameTest () {
606606 try {
607607 MerkleNode pointer = new MerkleNode ("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB" );
@@ -615,7 +615,7 @@ public void nameTest() {
615615 }
616616 }
617617
618- @ org . junit . Test
618+ @ Test
619619 public void dnsTest () {
620620 try {
621621 String domain = "ipfs.io" ;
@@ -633,7 +633,7 @@ public void mountTest() {
633633 }
634634 }
635635
636- @ org . junit . Test
636+ @ Test
637637 public void dhtTest () {
638638 try {
639639 Multihash pointer = Multihash .fromBase58 ("QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB" );
@@ -648,7 +648,7 @@ public void dhtTest() {
648648 }
649649 }
650650
651- @ org . junit . Test
651+ @ Test
652652 public void statsTest () {
653653 try {
654654 Map stats = ipfs .stats .bw ();
@@ -666,7 +666,7 @@ public void resolveTest() {
666666 }
667667 }
668668
669- @ org . junit . Test
669+ @ Test
670670 public void swarmTest () {
671671 try {
672672 String multiaddr = "/ip4/127.0.0.1/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" ;
@@ -695,7 +695,7 @@ public void swarmTest() {
695695 }
696696 }
697697
698- @ org . junit . Test
698+ @ Test
699699 public void bootstrapTest () {
700700 try {
701701 List <MultiAddress > bootstrap = ipfs .bootstrap .list ();
@@ -708,7 +708,7 @@ public void bootstrapTest() {
708708 }
709709 }
710710
711- @ org . junit . Test
711+ @ Test
712712 public void diagTest () {
713713 try {
714714 Map config = ipfs .config .show ();
@@ -723,7 +723,7 @@ public void diagTest() {
723723 }
724724 }
725725
726- @ org . junit . Test
726+ @ Test
727727 public void toolsTest () {
728728 try {
729729 String version = ipfs .version ();
0 commit comments