Lasagna exercise

When I run the tests, I get the errors that ‘@Test’ is not recognized. Something about JUnit not available?

What language? What is the full error (please do not use screenshots to share text)? How are you running the tests? Did you follow the docs about local setup and install?

Sorry for the late reply.

I use java 17, I create the code in NetBeans on my pc and then copy it to the online editor. This is the code (by the way: is there a code-button somewhere?):

import static java.lang.Integer.max;

/**
*

  • @author Piet
    */
    public class Lasagna {

    private final int expectedMinutesInOven = 40;
    private final int minutesPerLayer = 2;

    public final int expectedMinutesInOven() {
    return expectedMinutesInOven;
    }

    public final int remainingMinutesInOven(int minutesAlreadyInOven) {
    return max(expectedMinutesInOven - minutesAlreadyInOven, 0);
    }

    public final int preparationTimeInMinutes( int layers) {
    return layers * minutesPerLayer;
    }

    public final int totalTimeInMinutes(int layers, int minutesInOven) {
    return preparationTimeInMinutes(layers) + minutesInOven;
    }
    }

And these are the errors that I get when running the tests:

We received the following error when we ran your code:
./src/test/java/LasagnaTest.java:1: error: package org.junit does not exist
import org.junit.Test;
^./src/test/java/LasagnaTest.java:9: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:22: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:27: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:40: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:45: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:58: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:63: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:68: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:81: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTest./src/test/java/LasagnaTest.java:86: error: cannot find symbol
@Test
^
symbol: class Test
location: class LasagnaTestNote: ./src/test/java/utils/ReflectionProxy.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details.

Yes there is:
grafik