docs: update layers

This commit is contained in:
Ilkka Seppälä
2024-05-04 09:11:27 +03:00
parent ef42e169b9
commit 7460e46f9c
7 changed files with 58 additions and 45 deletions
+4 -24
View File
@@ -34,11 +34,15 @@ import jakarta.persistence.OneToMany;
import jakarta.persistence.OneToOne;
import java.util.HashSet;
import java.util.Set;
import lombok.Getter;
import lombok.Setter;
/**
* Cake entity.
*/
@Entity
@Getter
@Setter
public class Cake {
@Id
@@ -55,30 +59,6 @@ public class Cake {
setLayers(new HashSet<>());
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public CakeTopping getTopping() {
return topping;
}
public void setTopping(CakeTopping topping) {
this.topping = topping;
}
public Set<CakeLayer> getLayers() {
return layers;
}
public void setLayers(Set<CakeLayer> layers) {
this.layers = layers;
}
public void addLayer(CakeLayer layer) {
this.layers.add(layer);
}
@@ -25,6 +25,7 @@
package exception;
import java.io.Serial;
import org.springframework.stereotype.Component;
/**
@@ -33,6 +34,7 @@ import org.springframework.stereotype.Component;
@Component
public class CakeBakingException extends Exception {
@Serial
private static final long serialVersionUID = 1L;
public CakeBakingException() {
@@ -55,8 +55,6 @@ class CakeBakingExceptionTest {
* Tests the constructor of {@link CakeBakingException} that accepts a message.
* Ensures that an exception created with this constructor correctly stores the provided message
* and has {@code null} as its cause.
*
* @param expectedMessage The message provided to the constructor.
*/
@Test
void testConstructorWithMessage() {
@@ -47,7 +47,6 @@ import service.CakeBakingServiceImpl;
/**
* Constructs a new instance of CakeBakingServiceImplTest.
*
* @param cakeBakingService the service for cake baking operations
*/
@SpringBootTest(classes = LayersApp.class)
class CakeBakingServiceImplTest {
@@ -87,7 +87,7 @@ class CakeViewImplTest {
}
private class InMemoryAppender extends AppenderBase<ILoggingEvent> {
private static class InMemoryAppender extends AppenderBase<ILoggingEvent> {
private final List<ILoggingEvent> log = new LinkedList<>();