Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updated the project to use JUnit 5 instead of JUnit 4#185

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fishercoder1534 merged 1 commit intofishercoder1534:masterfromjscrdev:junit5
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletionsbuild.gradle
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,10 +31,6 @@ dependencies {
compile 'com.google.code.gson:gson:2.8.0'
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.0'

// TODO: to remove Junit4 after all tests are migrated to Junit5
compile 'junit:junit:4.13'
testCompile "junit:junit:4.13.1"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'

Expand Down
12 changes: 6 additions & 6 deletionssrc/test/java/com/fishercoder/firstthousand/_100Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,20 +3,20 @@
import com.fishercoder.common.classes.TreeNode;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._100;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

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

public class _100Test {
privatestatic_100.Solution1 solution1;
private _100.Solution1 solution1;
private static TreeNode p;
private static TreeNode q;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _100.Solution1();
}

Expand Down
14 changes: 7 additions & 7 deletionssrc/test/java/com/fishercoder/firstthousand/_101Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,18 +6,18 @@

import java.util.Arrays;

import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

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

public class _101Test {
privatestatic_101.Solution1 solution1;
privatestatic_101.Solution2 solution2;
private _101.Solution1 solution1;
private _101.Solution2 solution2;
private static TreeNode root;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _101.Solution1();
solution2 = new _101.Solution2();
}
Expand Down
10 changes: 5 additions & 5 deletionssrc/test/java/com/fishercoder/firstthousand/_102Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,17 +4,17 @@
import com.fishercoder.common.utils.CommonUtils;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._102;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

public class _102Test {
privatestatic_102.Solution1 solution1;
private _102.Solution1 solution1;
private static TreeNode treeRoot;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _102.Solution1();
}

Expand Down
10 changes: 5 additions & 5 deletionssrc/test/java/com/fishercoder/firstthousand/_103Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,17 +4,17 @@
import com.fishercoder.common.utils.CommonUtils;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._103;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

public class _103Test {
privatestatic_103.Solution1 solution1;
private _103.Solution1 solution1;
private static TreeNode root;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _103.Solution1();
}

Expand Down
14 changes: 7 additions & 7 deletionssrc/test/java/com/fishercoder/firstthousand/_104Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,18 +6,18 @@

import java.util.Arrays;

import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

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

public class _104Test {
privatestatic_104.Solution1 solution1;
privatestatic_104.Solution2 solution2;
private _104.Solution1 solution1;
private _104.Solution2 solution2;
private static TreeNode root;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _104.Solution1();
solution2 = new _104.Solution2();
}
Expand Down
12 changes: 6 additions & 6 deletionssrc/test/java/com/fishercoder/firstthousand/_105Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,20 +6,20 @@

import java.util.Arrays;

import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static junit.framework.Assert.assertEquals;
import staticorg.junit.jupiter.api.Assertions.assertEquals;

public class _105Test {
privatestatic_105.Solution1 solution1;
private _105.Solution1 solution1;
private static TreeNode expected;
private static TreeNode actual;
private static int[] preorder;
private static int[] inorder;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _105.Solution1();
}

Expand Down
14 changes: 7 additions & 7 deletionssrc/test/java/com/fishercoder/firstthousand/_106Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,23 +3,23 @@
import com.fishercoder.common.classes.TreeNode;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._106;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

import static junit.framework.Assert.assertEquals;
import staticorg.junit.jupiter.api.Assertions.assertEquals;

public class _106Test {
privatestatic_106.Solution1 solution1;
privatestatic_106.Solution2 solution2;
private _106.Solution1 solution1;
private _106.Solution2 solution2;
private static TreeNode expected;
private static TreeNode actual;
private static int[] inorder;
private static int[] postorder;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _106.Solution1();
solution2 = new _106.Solution2();
}
Expand Down
10 changes: 5 additions & 5 deletionssrc/test/java/com/fishercoder/firstthousand/_107Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,17 +4,17 @@
import com.fishercoder.common.utils.CommonUtils;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._107;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

public class _107Test {
privatestatic_107.Solution1 solution1;
private _107.Solution1 solution1;
private static TreeNode root;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _107.Solution1();
}

Expand Down
10 changes: 5 additions & 5 deletionssrc/test/java/com/fishercoder/firstthousand/_108Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,15 +2,15 @@

import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._108;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class _108Test {
privatestatic_108.Solution1 solution1;
private _108.Solution1 solution1;
private static int[] nums;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _108.Solution1();
}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@
import java.util.Arrays;

public class _109Test {
privatestatic_109.Solution1 solution1;
private _109.Solution1 solution1;
private static ListNode head;
private static TreeNode expected;

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;

public class _10Test {
privatestatic_10.Solution1 solution1;
private _10.Solution1 solution1;

@BeforeEach
public void setup() {
Expand Down
14 changes: 7 additions & 7 deletionssrc/test/java/com/fishercoder/firstthousand/_110Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,20 +3,20 @@
import com.fishercoder.common.classes.TreeNode;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._110;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

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

public class _110Test {
privatestatic_110.Solution1 solution1;
privatestatic_110.Solution2 solution2;
private _110.Solution1 solution1;
private _110.Solution2 solution2;
private static TreeNode treeNode;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _110.Solution1();
solution2 = new _110.Solution2();
}
Expand Down
14 changes: 7 additions & 7 deletionssrc/test/java/com/fishercoder/firstthousand/_113Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,24 +3,24 @@
import com.fishercoder.common.classes.TreeNode;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._113;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

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

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

public class _113Test {
privatestatic_113.Solution1 solution1;
privatestatic_113.Solution2 solution2;
private _113.Solution1 solution1;
private _113.Solution2 solution2;
private static TreeNode root;
private static int sum;
private static List<List<Integer>> expected;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _113.Solution1();
solution2 = new _113.Solution2();
}
Expand Down
10 changes: 5 additions & 5 deletionssrc/test/java/com/fishercoder/firstthousand/_114Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,17 +3,17 @@
import com.fishercoder.common.classes.TreeNode;
import com.fishercoder.common.utils.TreeUtils;
import com.fishercoder.solutions.firstthousand._114;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

public class _114Test {
privatestatic_114.Solution1 solution1;
private _114.Solution1 solution1;
private static TreeNode root;

@BeforeClass
public staticvoidsetup() {
@BeforeEach
publicvoidsetUp() {
solution1 = new _114.Solution1();
}

Expand Down
12 changes: 6 additions & 6 deletionssrc/test/java/com/fishercoder/firstthousand/_115Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
package com.fishercoder.firstthousand;

import com.fishercoder.solutions.firstthousand._115;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

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

public class _115Test {
privatestatic_115.Solution1 solution1;
private _115.Solution1 solution1;

@BeforeClass
public staticvoidsetup() {
@BeforeEach
publicvoidsetUp() {
solution1 = new _115.Solution1();
}

Expand Down
6 changes: 3 additions & 3 deletionssrc/test/java/com/fishercoder/firstthousand/_116Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,9 +5,9 @@
import org.junit.jupiter.api.Test;

public class _116Test {
privatestatic_116.Solution1 solution1;
privatestatic_116.Solution2 solution2;
privatestatic_116.Node root;
private _116.Solution1 solution1;
private _116.Solution2 solution2;
private _116.Node root;

@BeforeEach
public void setup() {
Expand Down
12 changes: 6 additions & 6 deletionssrc/test/java/com/fishercoder/firstthousand/_117Test.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
package com.fishercoder.firstthousand;

import com.fishercoder.solutions.firstthousand._117;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class _117Test {
privatestatic_117.Solution1 solution1;
privatestatic_117.Node root;
private _117.Solution1 solution1;
private _117.Node root;

@BeforeClass
publicstaticvoid setup() {
@BeforeEach
public void setup() {
solution1 = new _117.Solution1();
}

Expand Down
Loading
Loading

[8]ページ先頭

©2009-2025 Movatter.jp