Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TestRepo
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
Harish Kumar Kaiwart
TestRepo
Commits
a3947088
Commit
a3947088
authored
Oct 17, 2022
by
Harish Kumar Kaiwart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test repo
parent
bf294355
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
168 additions
and
0 deletions
+168
-0
.gitignore
.idea/.gitignore
+3
-0
pom.xml
pom.xml
+75
-0
App.java
src/main/java/com/nisum/App.java
+13
-0
Calculator.java
src/main/java/com/nisum/Calculator.java
+22
-0
AppTest.java
src/test/java/com/nisum/AppTest.java
+20
-0
CalculatorTest.java
src/test/java/com/nisum/CalculatorTest.java
+35
-0
App.class
target/classes/com/nisum/App.class
+0
-0
Calculator.class
target/classes/com/nisum/Calculator.class
+0
-0
AppTest.class
target/test-classes/com/nisum/AppTest.class
+0
-0
CalculatorTest.class
target/test-classes/com/nisum/CalculatorTest.class
+0
-0
No files found.
.idea/.gitignore
0 → 100644
View file @
a3947088
# Default ignored files
/shelf/
/workspace.xml
pom.xml
0 → 100644
View file @
a3947088
<?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>
com.nisum
</groupId>
<artifactId>
jenkins-demo1
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<name>
jenkins-demo1
</name>
<!-- FIXME change it to the project's website -->
<url>
http://www.example.com
</url>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<maven.compiler.source>
18
</maven.compiler.source>
<maven.compiler.target>
18
</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>
maven-clean-plugin
</artifactId>
<version>
3.1.0
</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
3.0.2
</version>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.8.0
</version>
</plugin>
<plugin>
<artifactId>
maven-surefire-plugin
</artifactId>
<version>
2.22.1
</version>
</plugin>
<plugin>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
3.0.2
</version>
</plugin>
<plugin>
<artifactId>
maven-install-plugin
</artifactId>
<version>
2.5.2
</version>
</plugin>
<plugin>
<artifactId>
maven-deploy-plugin
</artifactId>
<version>
2.8.2
</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>
maven-site-plugin
</artifactId>
<version>
3.7.1
</version>
</plugin>
<plugin>
<artifactId>
maven-project-info-reports-plugin
</artifactId>
<version>
3.0.0
</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
src/main/java/com/nisum/App.java
0 → 100644
View file @
a3947088
package
com
.
nisum
;
/**
* Hello world!
*
*/
public
class
App
{
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
"Hello World!"
);
}
}
src/main/java/com/nisum/Calculator.java
0 → 100644
View file @
a3947088
package
com
.
nisum
;
public
class
Calculator
{
public
int
sum
(
int
...
x
){
int
s
=
0
;
for
(
int
i:
x
)
s
+=
i
;
return
s
;
}
public
int
square
(
int
x
){
return
x
*
x
;
}
public
int
pow
(
int
x
,
int
r
){
int
res
=
1
;
for
(;
r
>
0
;
r
--)
res
*=
x
;
return
res
;
}
}
src/test/java/com/nisum/AppTest.java
0 → 100644
View file @
a3947088
package
com
.
nisum
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
org.junit.Test
;
/**
* Unit test for simple App.
*/
public
class
AppTest
{
/**
* Rigorous Test :-)
*/
@Test
public
void
shouldAnswerWithTrue
()
{
assertTrue
(
true
);
}
}
src/test/java/com/nisum/CalculatorTest.java
0 → 100644
View file @
a3947088
package
com
.
nisum
;
import
org.junit.After
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.Test
;
public
class
CalculatorTest
{
Calculator
calculator
;
@Before
public
void
setUp
()
throws
Exception
{
calculator
=
new
Calculator
();
}
@After
public
void
tearDown
()
throws
Exception
{
calculator
=
null
;
}
@Test
public
void
testSum
(){
Assert
.
assertEquals
(
100
,
calculator
.
sum
(
10
,
20
,
30
,
40
));
}
@Test
public
void
testSquare
(){
Assert
.
assertEquals
(
125
,
calculator
.
square
(
25
));
}
@Test
public
void
testPower
(){
Assert
.
assertEquals
(
100
,
calculator
.
pow
(
10
,
2
));
}
}
target/classes/com/nisum/App.class
0 → 100644
View file @
a3947088
File added
target/classes/com/nisum/Calculator.class
0 → 100644
View file @
a3947088
File added
target/test-classes/com/nisum/AppTest.class
0 → 100644
View file @
a3947088
File added
target/test-classes/com/nisum/CalculatorTest.class
0 → 100644
View file @
a3947088
File added
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