Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: migrate test to jupiter API #53

Merged
merged 2 commits into from
Feb 26, 2021
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@
package org.terasology.entityNetwork;

import org.joml.Vector3i;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.terasology.math.Side;
import org.terasology.math.SideBitFlag;

import java.util.function.BiPredicate;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class SidedLocationNetworkNodeTest {
static final String NETWORK_ID = "test";
private byte allDirections;

@Before
@BeforeEach
public void setup() {
allDirections = 63;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.google.common.collect.Sets;
import org.joml.Vector3i;
import org.joml.Vector3ic;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.terasology.entityNetwork.BlockLocationNetworkNode;
import org.terasology.entityNetwork.Network;
import org.terasology.entityNetwork.NetworkNode;
Expand All @@ -15,17 +15,18 @@

import java.util.Set;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;


public class BlockNetworkTest {
static final String NETWORK_ID = "test";
private BlockNetwork blockNetwork;
private TestListener listener;
private byte allDirections;

@Before
@BeforeEach
public void setup() {
blockNetwork = new BlockNetwork();
listener = new TestListener();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

import org.joml.Vector3i;
import org.joml.Vector3ic;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.terasology.entityNetwork.NetworkNode;
import org.terasology.entityNetwork.SidedBlockLocationNetworkNode;
import org.terasology.math.Side;
import org.terasology.math.SideBitFlag;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class SimpleNetworkTest {
static final String NETWORK_ID = "test";
private BlockNetwork network;
private byte allDirections;
private byte upOnly;

@Before
@BeforeEach
public void setup() {
network = new BlockNetwork();
allDirections = 63;
Expand Down