Skip to content

Commit

Permalink
Testing Changes Push 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kjindani committed Aug 25, 2023
1 parent f88b3c4 commit 6923a27
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 32 deletions.
56 changes: 27 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,30 @@
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- JUnit 5 Jupiter API -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>

<!-- JUnit Jupiter API for writing tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<!-- JUnit Jupiter Engine for running tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<!-- JUnit 5 Jupiter Engine -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>

<!-- JUnit Vintage Engine (if you need to run JUnit 3/4 tests) -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>

<!-- (Optional) JUnit Jupiter Params for parameterized tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>

</dependencies>

Expand All @@ -69,10 +63,14 @@
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<version>2.22.2</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.example.multiplyintegers;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

public class MultiplyIntegersTest {

Expand All @@ -24,4 +24,8 @@ public void testThreeNumbers() {
assertEquals(210, result);
}

@Test
public void testNoNumber() {
assertThrows(IllegalArgumentException.class, () -> MultiplyIntegers.multiply());
}
}
Binary file modified target/classes/com/example/multiplyintegers/MultiplyIntegers.class
Binary file not shown.
Binary file modified target/multiplyintegers-1.0-SNAPSHOT.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="com.example.multiplyintegers.MultiplyIntegersTest" time="0.027" tests="4" errors="0" skipped="0" failures="0">
<properties>
<property name="java.specification.version" value="17"/>
<property name="sun.cpu.isalist" value="amd64"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.class.path" value="D:\multiplyintegers\target\test-classes;D:\multiplyintegers\target\classes;C:\Users\Karim Jindani\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.0\junit-jupiter-api-5.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\Karim Jindani\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\platform\junit-platform-commons\1.7.0\junit-platform-commons-1.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.0\junit-jupiter-engine-5.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\platform\junit-platform-engine\1.7.0\junit-platform-engine-1.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\vintage\junit-vintage-engine\5.7.0\junit-vintage-engine-5.7.0.jar;C:\Users\Karim Jindani\.m2\repository\junit\junit\4.13\junit-4.13.jar;C:\Users\Karim Jindani\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;"/>
<property name="java.vm.vendor" value="Eclipse Adoptium"/>
<property name="sun.arch.data.model" value="64"/>
<property name="user.variant" value=""/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value="Asia/Karachi"/>
<property name="os.name" value="Windows 11"/>
<property name="java.vm.specification.version" value="17"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="US"/>
<property name="sun.boot.library.path" value="C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin"/>
<property name="sun.java.command" value="C:\Users\KARIMJ~1\AppData\Local\Temp\surefire3543297246925540873\surefirebooter9310225179680142941.jar C:\Users\Karim Jindani\AppData\Local\Temp\surefire3543297246925540873 2023-08-25T08-48-28_219-jvmRun1 surefire9596003208428817891tmp surefire_010882970687103610768tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="D:\multiplyintegers\target\test-classes;D:\multiplyintegers\target\classes;C:\Users\Karim Jindani\.m2\repository\org\junit\jupiter\junit-jupiter-api\5.7.0\junit-jupiter-api-5.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\Karim Jindani\.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\platform\junit-platform-commons\1.7.0\junit-platform-commons-1.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\jupiter\junit-jupiter-engine\5.7.0\junit-jupiter-engine-5.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\platform\junit-platform-engine\1.7.0\junit-platform-engine-1.7.0.jar;C:\Users\Karim Jindani\.m2\repository\org\junit\vintage\junit-vintage-engine\5.7.0\junit-vintage-engine-5.7.0.jar;C:\Users\Karim Jindani\.m2\repository\junit\junit\4.13\junit-4.13.jar;C:\Users\Karim Jindani\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="C:\Users\Karim Jindani"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2023-07-18"/>
<property name="java.home" value="C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot"/>
<property name="file.separator" value="\"/>
<property name="basedir" value="D:\multiplyintegers"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="surefire.real.class.path" value="C:\Users\KARIMJ~1\AppData\Local\Temp\surefire3543297246925540873\surefirebooter9310225179680142941.jar"/>
<property name="user.script" value=""/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="17.0.8+7"/>
<property name="user.name" value="Karim Jindani"/>
<property name="path.separator" value=";"/>
<property name="os.version" value="10.0"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="Cp1252"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-17.0.8+7"/>
<property name="localRepository" value="C:\Users\Karim Jindani\.m2\repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="C:\Users\KARIMJ~1\AppData\Local\Temp\"/>
<property name="java.version" value="17.0.8"/>
<property name="user.dir" value="D:\multiplyintegers"/>
<property name="os.arch" value="amd64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="sun.os.patch.level" value=""/>
<property name="native.encoding" value="Cp1252"/>
<property name="java.library.path" value="C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\Users\Karim Jindani\AppData\Local\Microsoft\WindowsApps;C:\Users\Karim Jindani\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts;C:\Users\Karim Jindani\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Karim Jindani\AppData\Roaming\npm;D:\apache-maven-3.9.4\bin;."/>
<property name="java.vm.info" value="mixed mode, sharing"/>
<property name="java.vendor" value="Eclipse Adoptium"/>
<property name="java.vm.version" value="17.0.8+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="java.class.version" value="61.0"/>
</properties>
<testcase name="testSingleNumber" classname="com.example.multiplyintegers.MultiplyIntegersTest" time="0.017"/>
<testcase name="testNoNumber" classname="com.example.multiplyintegers.MultiplyIntegersTest" time="0.001"/>
<testcase name="testThreeNumbers" classname="com.example.multiplyintegers.MultiplyIntegersTest" time="0"/>
<testcase name="testTwoNumbers" classname="com.example.multiplyintegers.MultiplyIntegersTest" time="0.001"/>
</testsuite>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: com.example.multiplyintegers.MultiplyIntegersTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 s - in com.example.multiplyintegers.MultiplyIntegersTest
Binary file not shown.

0 comments on commit 6923a27

Please sign in to comment.