Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Ivanov <[email protected]>
  • Loading branch information
0xivanov committed Nov 28, 2024
1 parent 8ab2853 commit 07e2540
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class NodeCreateTransactionTest {
private static final byte[] TEST_GRPC_CERTIFICATE_HASH = new byte[]{5, 6, 7, 8, 9};

private static final PublicKey TEST_ADMIN_KEY = PrivateKey.fromString(
"302e020100300506032b65700422042062c4b69e9f45a554e5424fb5a6fe5e6ac1f19ead31dc7718c2d980fd1f998d4b")
"302e020100300506032b65700422042062c4b69e9f45a554e5424fb5a6fe5e6ac1f19ead31dc7718c2d980fd1f998d4b")
.getPublicKey();

final Instant TEST_VALID_START = Instant.ofEpochSecond(1554158542);
Expand All @@ -83,7 +83,7 @@ void shouldSerialize() {

private static Endpoint spawnTestEndpoint(byte offset) {
return new Endpoint()
.setAddress(new byte[] {0x00, 0x01, 0x02, 0x03})
.setAddress(new byte[]{0x00, 0x01, 0x02, 0x03})
.setDomainName(offset + "unit.test.com")
.setPort(42 + offset);
}
Expand Down Expand Up @@ -126,13 +126,12 @@ void fromScheduledTransaction() {
void testUnrecognizedServicePort() throws Exception {
var tx = new NodeCreateTransaction()
.setServiceEndpoints(
List.of(new Endpoint()
.setAddress(new byte[] {0x00, 0x01, 0x02, 0x03})
.setDomainName("unit.test.com")
.setPort(50111)));
var tx2Bytes = tx.toBytes();
NodeCreateTransaction deserializedTx = (NodeCreateTransaction) Transaction.fromBytes(tx2Bytes);
assertThat(tx.getServiceEndpoints()).isEqualTo(deserializedTx.getServiceEndpoints());
List.of(new Endpoint()
.setAddress(new byte[]{0x00, 0x01, 0x02, 0x03})
.setDomainName("unit.test.com")
.setPort(50111)));
var tx2 = NodeCreateTransaction.fromBytes(tx.toBytes());
assertThat(tx2.toString()).isEqualTo(tx.toString());
}

@Test
Expand All @@ -143,7 +142,7 @@ void testNullOptionalValues() throws Exception {
}

@Test
void testSetNull() {
void testSetNull() {
new NodeCreateTransaction()
.setDescription(null)
.setAccountId(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void shouldSerialize() {

private static Endpoint spawnTestEndpoint(byte offset) {
return new Endpoint()
.setAddress(new byte[] {0x00, 0x01, 0x02, 0x03})
.setAddress(new byte[]{0x00, 0x01, 0x02, 0x03})
.setDomainName(offset + "unit.test.com")
.setPort(42 + offset);
}
Expand Down Expand Up @@ -129,7 +129,7 @@ void testUnrecognizedServicePort() throws Exception {
var tx = new NodeUpdateTransaction()
.setServiceEndpoints(
List.of(new Endpoint()
.setAddress(new byte[] {0x00, 0x01, 0x02, 0x03})
.setAddress(new byte[]{0x00, 0x01, 0x02, 0x03})
.setDomainName("unit.test.com")
.setPort(50111)));
var tx2 = NodeUpdateTransaction.fromBytes(tx.toBytes());
Expand All @@ -148,7 +148,7 @@ void testEmptyCertificates() throws Exception {
}

@Test
void testSetNull() {
void testSetNull() {
new NodeUpdateTransaction()
.setDescription(null)
.setAccountId(null)
Expand Down

0 comments on commit 07e2540

Please sign in to comment.