mirror of
https://github.com/wahyd4/afterpay-creditcard.git
synced 2026-08-08 21:06:52 +10:00
Add test coverage plugin to see the code coverage
This commit is contained in:
+14
-1
@@ -1,5 +1,6 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'jacoco'
|
||||
}
|
||||
|
||||
group 'com.github.wahyd4'
|
||||
@@ -12,5 +13,17 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
// testCompile group: 'junit', name: 'junit', version: '4.12'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
|
||||
}
|
||||
|
||||
test {
|
||||
|
||||
useJUnitPlatform()
|
||||
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed"
|
||||
}
|
||||
|
||||
}
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
#Sat Mar 21 23:13:59 AEDT 2020
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.github.wahyd4.creditcard.service;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class FraudCheckerTest {
|
||||
|
||||
@@ -52,5 +52,5 @@ public class FraudCheckerTest {
|
||||
List<String> strings = fraudChecker.fraudulentCreditCards(entries, threshold);
|
||||
assertEquals(Arrays.asList("10d7ce2f43e35fa57d1bbf8b1e2"), strings);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user