Skip to content

Commit

Permalink
issue_872: Applied lombok to these test classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatSilentCoder committed Jan 14, 2025
1 parent 1123af6 commit 40377dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import hirs.structs.elements.Struct;
import hirs.structs.elements.StructElementLength;
import hirs.structs.elements.StructElements;
import lombok.Getter;

import java.util.Arrays;

/**
* A struct to be embedded within TestStruct.
*/
@Getter
@StructElements(elements = {"embeddedSize", "embeddedShort", "embedded"})
public class TestEmbeddedStruct implements Struct {

Expand All @@ -20,7 +22,6 @@ public class TestEmbeddedStruct implements Struct {

private static final byte[] DEFAULT_ARRAY = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};


@StructElementLength(fieldName = "embedded")
private int embeddedSize = EMBEDDED_SIZE;

Expand Down Expand Up @@ -57,30 +58,4 @@ public final int hashCode() {
return result;
}

/**
* Getter.
*
* @return value
*/
public byte[] getEmbedded() {
return embedded;
}

/**
* Getter.
*
* @return value
*/
public short getEmbeddedShort() {
return embeddedShort;
}

/**
* Getter.
*
* @return value
*/
public int getEmbeddedSize() {
return embeddedSize;
}
}
46 changes: 2 additions & 44 deletions HIRS_Structs/src/test/java/hirs/structs/converters/TestStruct.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import hirs.structs.elements.Struct;
import hirs.structs.elements.StructElementLength;
import hirs.structs.elements.StructElements;
import lombok.Getter;

/**
* A Struct class designed to fully test the design of the converter being tested.
*/
@Getter
@StructElements(
elements = {"testShort", "testEmbeddedStruct", "testByte", "testVariableStructLength",
"testVariableStruct"})
Expand Down Expand Up @@ -52,48 +54,4 @@ public final int hashCode() {
return result;
}

/**
* Getter.
*
* @return value
*/
public byte getTestByte() {
return testByte;
}

/**
* Getter.
*
* @return value
*/
public short getTestShort() {
return testShort;
}

/**
* Getter.
*
* @return value
*/
public TestEmbeddedStruct getTestEmbeddedStruct() {
return testEmbeddedStruct;
}

/**
* Getter.
*
* @return value
*/
public TestVariableStruct getTestVariableStruct() {
return testVariableStruct;
}

/**
* Getter.
*
* @return value
*/
public int getTestVariableStructLength() {
return testVariableStructLength;
}
}

0 comments on commit 40377dd

Please sign in to comment.