Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
JUnit_demo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kyle Muldoon
JUnit_demo
Commits
80b6eadd
Commit
80b6eadd
authored
Apr 08, 2021
by
Kyle Muldoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial files commit
parent
eda6fdd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
.gitignore
.gitignore
+2
-0
pom.xml
pom.xml
+27
-0
Calculator.java
src/main/java/Calculator.java
+3
-0
CalculatorTest.java
src/test/java/CalculatorTest.java
+14
-0
No files found.
.gitignore
0 → 100644
View file @
80b6eadd
/target
/.idea
pom.xml
0 → 100644
View file @
80b6eadd
<?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
src/main/java/Calculator.java
0 → 100644
View file @
80b6eadd
public
class
Calculator
{
public
Long
addTwo
(
Long
l
,
Long
r
)
{
return
l
+
r
;}
}
src/test/java/CalculatorTest.java
0 → 100644
View file @
80b6eadd
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
(
10
l
,
15
l
);
assertEquals
(
res
,
25L
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment