chore: update

This commit is contained in:
TakahashiNg
2026-05-06 10:07:06 +00:00
parent 7e640e2c95
commit c86965058f
5 changed files with 8 additions and 7 deletions
@@ -18,5 +18,5 @@ public class AddMenuItem implements MenuItemInterface {
private String name; private String name;
private double price; private Double price;
} }
@@ -9,6 +9,7 @@ import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.eclipse.microprofile.graphql.Input; import org.eclipse.microprofile.graphql.Input;
import org.eclipse.microprofile.graphql.NonNull;
@Input @Input
@Getter @Getter
@@ -18,9 +19,10 @@ import org.eclipse.microprofile.graphql.Input;
@RegisterForReflection @RegisterForReflection
public class UpdateMenuItem implements EntityInterface, MenuItemInterface { public class UpdateMenuItem implements EntityInterface, MenuItemInterface {
@NonNull
UUID id; UUID id;
String name; String name;
double price; Double price;
} }
@@ -18,7 +18,7 @@ public class MenuItemEntity extends BaseEntity implements MenuItemInterface {
public String name; public String name;
@Column(nullable = false) @Column(nullable = false)
public double price; public Double price;
@ManyToOne(fetch = FetchType.LAZY) @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "eatery_id") @JoinColumn(name = "eatery_id")
@@ -306,8 +306,7 @@ public class EateryServiceTest {
.when() .when()
.post("/graphql") .post("/graphql")
.then() .then()
.body("", is("lmao")) .body("data.updateMenuItem.name", is(newValue))
// .body("data.updateMenuItem.name", is(newValue))
.body("data.updateMenuItem.id", is(lastSavedId)) .body("data.updateMenuItem.id", is(lastSavedId))
.statusCode(200); .statusCode(200);
} }
@@ -3,6 +3,6 @@ package com.drinkool.interfaces;
public interface MenuItemInterface { public interface MenuItemInterface {
String getName(); String getName();
void setName(String x); void setName(String x);
double getPrice(); Double getPrice();
void setPrice(double x); void setPrice(Double x);
} }