Commit 80b6eadd authored by Kyle Muldoon's avatar Kyle Muldoon

initial files commit

parent eda6fdd5
/target
/.idea
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>JUnit_practice</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
</project>
\ No newline at end of file
public class Calculator {
public Long addTwo(Long l, Long r) {return l + r;}
}
import org.junit.Test;
import static org.junit.Assert.*;
public class CalculatorTest {
public static void main(String[] args) {
Calculator calculator = new Calculator();
long res = calculator.addTwo(10l, 15l);
assertEquals(res, 25L);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment