Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.release>23</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -32,18 +32,27 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Kompilatorplugin med Java 23 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>23</release>
</configuration>
</plugin>

<!-- Kör enhetstester -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>

<!-- Kör integrationstester (om du behöver) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
Expand All @@ -57,13 +66,12 @@
</execution>
</executions>
</plugin>

<!-- Jacoco för kodtäckning -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand All @@ -73,7 +81,7 @@
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/com/example/NotificationService.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package com.example;

public interface NotificationService {
void sendBookingConfirmation(Booking booking) throws NotificationException;
void sendCancellationConfirmation(Booking booking) throws NotificationException;
public class NotificationService {
public void sendBookingConfirmation(Booking booking) throws NotificationException {
// kod som kan kasta NotificationException
}

public void sendCancellationConfirmation(Booking booking) throws NotificationException {
// kod som kan kasta NotificationException
}
}