Skip to content

Commit 49097c8

Browse files
committed
Simplify service tests and remove duplicate README section
Signed-off-by: Aman <amkr6207@gmail.com>
1 parent a1d4a69 commit 49097c8

3 files changed

Lines changed: 0 additions & 38 deletions

File tree

README.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,6 @@ public class HieroAccountService {
7777
All APIs of the client are synchronous and return the result of the operation.
7878
For asynchronous operations, you can easily wrap calls by use the [`@Async` annotation of spring](https://spring.io/guides/gs/async-method).
7979

80-
### Hook lifecycle management
81-
82-
`AccountClient` exposes hook lifecycle management via `updateAccountHooks(...)`.
83-
This operation delegates to Hedera SDK account update hook fields (`addHookToCreate`, `addHookToDelete`).
84-
85-
```java
86-
import com.hedera.hashgraph.sdk.ContractId;
87-
import com.hedera.hashgraph.sdk.EvmHook;
88-
import java.util.List;
89-
import org.hiero.base.AccountClient;
90-
import org.hiero.base.data.Account;
91-
import org.hiero.base.data.HookDetails;
92-
import org.hiero.base.data.HookExtensionPoint;
93-
94-
HookDetails hookToCreate =
95-
new HookDetails(
96-
HookExtensionPoint.ACCOUNT_ALLOWANCE_HOOK,
97-
1001L,
98-
new EvmHook(ContractId.fromString("0.0.5001")),
99-
null);
100-
101-
accountClient.updateAccountHooks(account, List.of(hookToCreate), List.of(77L));
102-
```
103-
10480
### Hiero Spring Sample
10581

10682
A sample application that uses the Hiero Spring module can be found in the `hiero-enterprise-spring-sample` module.

hiero-enterprise-microprofile/src/test/java/org/hiero/microprofile/test/ServicesTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
import io.helidon.microprofile.tests.junit5.Configuration;
55
import io.helidon.microprofile.tests.junit5.HelidonTest;
66
import jakarta.inject.Inject;
7-
import java.lang.reflect.Method;
8-
import java.util.List;
97
import org.eclipse.microprofile.config.Config;
108
import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
119
import org.hiero.base.AccountClient;
1210
import org.hiero.base.FileClient;
1311
import org.hiero.base.HookClient;
1412
import org.hiero.base.SmartContractClient;
15-
import org.hiero.base.data.Account;
1613
import org.hiero.base.protocol.ProtocolLayerClient;
1714
import org.hiero.microprofile.ClientProvider;
1815
import org.junit.jupiter.api.Assertions;
@@ -49,9 +46,5 @@ void testServices() throws Exception {
4946
Assertions.assertNotNull(hookClient);
5047
Assertions.assertNotNull(fileClient);
5148
Assertions.assertNotNull(smartContractClient);
52-
53-
final Method method =
54-
AccountClient.class.getMethod("updateAccountHooks", Account.class, List.class, List.class);
55-
Assertions.assertNotNull(method);
5649
}
5750
}

hiero-enterprise-spring/src/test/java/org/hiero/spring/test/ServicesTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
package org.hiero.spring.test;
22

3-
import java.lang.reflect.Method;
4-
import java.util.List;
53
import org.hiero.base.AccountClient;
64
import org.hiero.base.FileClient;
75
import org.hiero.base.HookClient;
86
import org.hiero.base.SmartContractClient;
9-
import org.hiero.base.data.Account;
107
import org.hiero.base.protocol.ProtocolLayerClient;
118
import org.hiero.base.verification.ContractVerificationClient;
129
import org.junit.jupiter.api.Assertions;
@@ -37,9 +34,5 @@ void testServices() throws Exception {
3734
Assertions.assertNotNull(hookClient);
3835
Assertions.assertNotNull(fileServiceClient);
3936
Assertions.assertNotNull(smartContractServiceClient);
40-
41-
final Method method =
42-
AccountClient.class.getMethod("updateAccountHooks", Account.class, List.class, List.class);
43-
Assertions.assertNotNull(method);
4437
}
4538
}

0 commit comments

Comments
 (0)