Skip to content

Commit

Permalink
Migrated to Junit5
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schnell committed Dec 25, 2023
1 parent bd64b63 commit 41c43ef
Show file tree
Hide file tree
Showing 173 changed files with 727 additions and 986 deletions.
10 changes: 8 additions & 2 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

Expand All @@ -83,6 +83,12 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.fuin</groupId>
<artifactId>units4j</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions api/src/main/java/org/fuin/esc/api/CommonEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
*/
package org.fuin.esc.api;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Nullable;

/**
* Event that is uniquely identified by a UUID. It's equals and hash code methods are defined on the
* <code>id</code>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
*/
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;
import org.fuin.objects4j.common.Contract;

import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.Supplier;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;

/**
* Asynchronous event store that uses a synchronous one internally.
*/
Expand Down
9 changes: 4 additions & 5 deletions api/src/main/java/org/fuin/esc/api/EventId.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@
*/
package org.fuin.esc.api;

import java.io.Serializable;
import java.util.UUID;

import org.fuin.objects4j.common.Immutable;
import jakarta.validation.constraints.NotNull;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.vo.UUIDStr;
import org.fuin.objects4j.vo.UUIDStrValidator;
import org.fuin.objects4j.vo.ValueObjectWithBaseType;

import java.io.Serializable;
import java.util.UUID;

/**
* Represents a unique event identifier.
*/
Expand Down
3 changes: 1 addition & 2 deletions api/src/main/java/org/fuin/esc/api/EventIdConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
*/
package org.fuin.esc.api;

import jakarta.annotation.Nullable;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;

import org.fuin.objects4j.common.Nullable;

/**
* XML Converter for event IDs.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/org/fuin/esc/api/EventStoreBasicsAsync.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
package org.fuin.esc.api;

import java.util.concurrent.CompletableFuture;

import jakarta.validation.constraints.NotNull;

import java.util.concurrent.CompletableFuture;

/**
* Basic synchronous operations shared by all event store types.
*/
Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/org/fuin/esc/api/ExpectedVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package org.fuin.esc.api;

import org.fuin.objects4j.common.Nullable;
import jakarta.annotation.Nullable;

/**
* Stream version numbers that have a special meaning. This is used for an optimistic concurrency check on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
package org.fuin.esc.api;

import java.util.List;

import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
* An event store that provides a projection administration API.
*/
Expand Down
7 changes: 3 additions & 4 deletions api/src/main/java/org/fuin/esc/api/ProjectionStreamId.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
*/
package org.fuin.esc.api;

import java.util.Collections;
import java.util.List;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.vo.KeyValue;

import java.util.Collections;
import java.util.List;

/**
* Projection stream identifier that is based on a name.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
package org.fuin.esc.api;

import java.util.concurrent.CompletableFuture;

import jakarta.validation.constraints.NotNull;

import java.util.concurrent.CompletableFuture;

/**
* Interface for reading events from an event store asynchronously. Calling any
* method on a non-open event store will implicitly {@link #open()} it.
Expand Down
3 changes: 1 addition & 2 deletions api/src/main/java/org/fuin/esc/api/SimpleCommonEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
*/
package org.fuin.esc.api;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;

/**
* Event that is uniquely identified by a UUID. It's equals and hash code methods are defined on the
Expand Down
7 changes: 3 additions & 4 deletions api/src/main/java/org/fuin/esc/api/SimpleStreamId.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
*/
package org.fuin.esc.api;

import java.util.Collections;
import java.util.List;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.vo.KeyValue;

import java.util.Collections;
import java.util.List;

/**
* Stream identifier that is based on a name.
*/
Expand Down
1 change: 0 additions & 1 deletion api/src/main/java/org/fuin/esc/api/SimpleTenantId.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

Expand Down
11 changes: 5 additions & 6 deletions api/src/main/java/org/fuin/esc/api/StreamEventsSlice.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@
*/
package org.fuin.esc.api;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.fuin.objects4j.common.Immutable;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import jakarta.validation.constraints.NotNull;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;

/**
*
*/
Expand Down
7 changes: 3 additions & 4 deletions api/src/main/java/org/fuin/esc/api/StreamId.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
*/
package org.fuin.esc.api;

import java.io.Serializable;
import java.util.List;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.vo.KeyValue;

import java.io.Serializable;
import java.util.List;

/**
* Name of a stream that is unique within the event store.<br>
* <br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
package org.fuin.esc.api;

import java.util.function.BiConsumer;

import jakarta.validation.constraints.NotNull;

import java.util.function.BiConsumer;

/**
* An event store that is capable of handling volatile subscriptions. Calling
* any method on a non-open event store will implicitly {@link #open()} it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import java.util.concurrent.CompletableFuture;
import java.util.function.BiConsumer;

import jakarta.validation.constraints.NotNull;

/**
* An event store that is capable of handling volatile subscriptions. Calling
* any method on a non-open event store will implicitly {@link #open()} it.
Expand Down
5 changes: 2 additions & 3 deletions api/src/main/java/org/fuin/esc/api/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
*/
package org.fuin.esc.api;

import java.io.Serializable;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Nullable;
import java.io.Serializable;

/**
* Result of subscribing to a stream. The sub classes will contain
Expand Down
3 changes: 1 addition & 2 deletions api/src/main/java/org/fuin/esc/api/TypeName.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
*/
package org.fuin.esc.api;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import jakarta.validation.constraints.NotEmpty;
import org.fuin.objects4j.vo.AbstractStringValueObject;

/**
Expand Down
4 changes: 2 additions & 2 deletions api/src/main/java/org/fuin/esc/api/WritableEventStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
package org.fuin.esc.api;

import java.util.List;

import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
* Interface for writing events to an event store synchronously. Calling any
* method on a non-open event store will implicitly {@link #open()} it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
package org.fuin.esc.api;

import jakarta.validation.constraints.NotNull;

import java.util.List;
import java.util.concurrent.CompletableFuture;

import jakarta.validation.constraints.NotNull;

/**
* Interface for writing events to an event store asynchronously. Calling any
* method on a non-open event store will implicitly {@link #open()} it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
*/
package org.fuin.esc.api;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;

import org.fuin.objects4j.common.Contract;
import org.fuin.objects4j.common.Immutable;
import org.fuin.objects4j.common.Nullable;

/**
* Signals a conflict between an expected and an actual version.
Expand Down
Loading

0 comments on commit 41c43ef

Please sign in to comment.