File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
main/java/com/openelements/hedera/microprofile
test/java/com/openelements/hedera/microprofile/test Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ private HederaNetwork getHederaNetwork() {
6464 throw new IllegalStateException ("network value is null" );
6565 }
6666 return HederaNetwork .findByName (network )
67- .orElseThrow (() -> new IllegalArgumentException (
68- "'hedera.network' property must be set to a valid value. Is '" + network + "'" ));
67+ .orElse (HederaNetwork .CUSTOM );
6968 }
7069
7170 private Client createClient () {
Original file line number Diff line number Diff line change 11package com .openelements .hedera .microprofile .test ;
22
3+ import com .hedera .hashgraph .sdk .FileId ;
34import com .openelements .hedera .base .FileClient ;
45import com .openelements .hedera .microprofile .ClientProvider ;
56import io .helidon .microprofile .tests .junit5 .AddBean ;
@@ -29,7 +30,14 @@ static void setup() {
2930
3031 @ Test
3132 void testFileClient () throws Exception {
33+ //given
34+ final byte [] contents = "Hello, Hedera!" .getBytes ();
3235 Assertions .assertNotNull (fileClient );
33- fileClient .createFile (new byte [0 ]);
36+
37+ //when
38+ final FileId fileId = fileClient .createFile (contents );
39+
40+ //then
41+ Assertions .assertNotNull (fileId );
3442 }
3543}
You can’t perform that action at this time.
0 commit comments