changed entity name
This commit is contained in:
@@ -81,13 +81,13 @@ public class HomeBoxConnectionProvider implements ConnectionProvider {
|
||||
|
||||
@Override
|
||||
public ConnectionEntity connectionToEntity(ConnectionRequest request, ConnectionResponse response) {
|
||||
return HomeboxEntity.from(request, response);
|
||||
return HomeBoxEntity.from(request, response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateToRepository(ConnectionEntity existing, ConnectionResponse response) {
|
||||
|
||||
if (existing instanceof HomeboxEntity hbE) {
|
||||
if (existing instanceof HomeBoxEntity hbE) {
|
||||
|
||||
hbE.setToken(response.token());
|
||||
hbE.setExpiresAt(response.expiresAt());
|
||||
|
||||
+3
-3
@@ -14,15 +14,15 @@ import lombok.Setter;
|
||||
@DiscriminatorValue("HOMEBOX")
|
||||
@Getter
|
||||
@Setter
|
||||
public class HomeboxEntity extends ConnectionEntity {
|
||||
public class HomeBoxEntity extends ConnectionEntity {
|
||||
|
||||
private String token;
|
||||
private String attachmentToken;
|
||||
private Instant expiresAt;
|
||||
|
||||
public static HomeboxEntity from(ConnectionRequest request, ConnectionResponse response) {
|
||||
public static HomeBoxEntity from(ConnectionRequest request, ConnectionResponse response) {
|
||||
|
||||
HomeboxEntity he = new HomeboxEntity();
|
||||
HomeBoxEntity he = new HomeBoxEntity();
|
||||
|
||||
he.setAppUrl(request.appUrl());
|
||||
he.setUsername(request.username());
|
||||
@@ -175,7 +175,7 @@ class HomeboxIntegrationTest {
|
||||
assertThat(dbEntry.getAppUrl()).isEqualTo(request.appUrl());
|
||||
assertThat(dbEntry.getUsername()).isEqualTo(request.username());
|
||||
|
||||
if (dbEntry instanceof HomeboxEntity hbE) {
|
||||
if (dbEntry instanceof HomeBoxEntity hbE) {
|
||||
assertThat(hbE.getToken()).isEqualTo("fake-jwt-token");
|
||||
assertThat(hbE.getAttachmentToken()).isEqualTo("fake-attach");
|
||||
assertThat(hbE.getExpiresAt().toString()).hasToString("2026-04-26T02:23:13Z");
|
||||
|
||||
Reference in New Issue
Block a user