Skip to content

Commit

Permalink
Merge pull request #12 from phighum/INS-91
Browse files Browse the repository at this point in the history
INS-91: fixes tests for new jackson version
  • Loading branch information
mark-jones-at-bettercloud authored Jun 16, 2022
2 parents 4d49c34 + 8c7a687 commit aa312af
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 129 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,25 @@ public int hashCode() {
}
}

enum TestColumns implements Column {

STRING_VALUE("stringValueFamily", "stringValueQualifier", new TypeReference<String>() {
}, false),
BOOLEAN_VALUE("booleanValueFamily", "booleanValueQualifier", new TypeReference<Boolean>() {
}, false),
NESTED_OBJECT("nestedObjectFamily", "nestedObjectQualifier", new TypeReference<TestNestedObject>() {
}, false);

static class TestColumns<T> implements Column {

public static final TestColumns<String> STRING_VALUE = new TestColumns<>(
"stringValueFamily", "stringValueQualifier", new TypeReference<String>() {}, false);
public static final TestColumns<Boolean> BOOLEAN_VALUE = new TestColumns<>(
"booleanValueFamily", "booleanValueQualifier", new TypeReference<Boolean>() {}, false);
public static final TestColumns<TestNestedObject> NESTED_OBJECT = new TestColumns<>(
"nestedObjectFamily", "nestedObjectQualifier", new TypeReference<TestNestedObject>() {}, false);
private final String family;
private final String qualifier;
private final TypeReference<?> typeReference;

private final TypeReference<T> typeReference;
private final boolean isVersioned;

TestColumns(final String family, final String qualifier, final TypeReference<?> typeReference, final boolean isVersioned) {
TestColumns(
final String family,
final String qualifier,
final TypeReference<T> typeReference,
final boolean isVersioned) {
this.family = family;
this.qualifier = qualifier;
this.typeReference = typeReference;
Expand All @@ -128,6 +132,10 @@ public TypeReference<?> getTypeReference() {
return typeReference;
}

public TypeReference<T> getTestTypeReference() {
return typeReference;
}

@Override
public boolean isVersioned() {
return isVersioned;
Expand Down Expand Up @@ -237,19 +245,19 @@ public int hashCode() {
}
}

enum TestVersionedColumns implements Column {
static class TestVersionedColumns<T> implements Column {

STRING_VALUE("stringValueFamily", "stringValueQualifier", new TypeReference<String>() {
}, false),
VERSIONED_BOOLEAN_VALUE("versionedBooleanValueFamily", "versionedBooleanValueQualifier", new TypeReference<Boolean>() {
}, true);
public static final TestColumns<String> STRING_VALUE = new TestColumns<>(
"stringValueFamily", "stringValueQualifier", new TypeReference<String>() {}, false);
public static final TestColumns<Boolean> VERSIONED_BOOLEAN_VALUE = new TestColumns<>(
"versionedBooleanValueFamily", "versionedBooleanValueQualifier", new TypeReference<Boolean>() {}, true);

private final String family;
private final String qualifier;
private final TypeReference<?> typeReference;
private final TypeReference<T> typeReference;
private final boolean isVersioned;

TestVersionedColumns(final String family, final String qualifier, final TypeReference<?> typeReference, final boolean isVersioned) {
TestVersionedColumns(final String family, final String qualifier, final TypeReference<T> typeReference, final boolean isVersioned) {
this.family = family;
this.qualifier = qualifier;
this.typeReference = typeReference;
Expand All @@ -271,6 +279,10 @@ public TypeReference<?> getTypeReference() {
return typeReference;
}

public TypeReference<T> getTestTypeReference() {
return typeReference;
}

@Override
public boolean isVersioned() {
return isVersioned;
Expand Down
Loading

0 comments on commit aa312af

Please sign in to comment.