Skip to content

Commit a2f465f

Browse files
committed
Initial commit
0 parents  commit a2f465f

File tree

341 files changed

+8895
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+8895
-0
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
Binary file not shown.
Binary file not shown.
1 Byte
Binary file not shown.
17 Bytes
Binary file not shown.

.gradle/5.1/fileHashes/fileHashes.bin

39.2 KB
Binary file not shown.
17 Bytes
Binary file not shown.
23.5 KB
Binary file not shown.

.gradle/5.1/gc.properties

Whitespace-only changes.
2.68 MB
Binary file not shown.
96 KB
Binary file not shown.
17 Bytes
Binary file not shown.
20.7 KB
Binary file not shown.

.gradle/7.3/checksums/checksums.lock

17 Bytes
Binary file not shown.
1 Byte
Binary file not shown.
17 Bytes
Binary file not shown.

.gradle/7.3/gc.properties

Whitespace-only changes.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Fri May 19 01:56:03 IST 2023
2+
gradle.version=5.1
19.1 KB
Binary file not shown.

.gradle/vcs-1/gc.properties

Whitespace-only changes.

.gradle/workspace-id.txt

28 Bytes
Binary file not shown.

.gradle/workspace-id.txt.lock

17 Bytes
Binary file not shown.

.idea/.gitignore

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Input.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ADD_DRIVER D1 0 1
2+
ADD_DRIVER D2 2 3
3+
ADD_RIDER R1 3 5
4+
ADD_DRIVER D3 4 2
5+
ADD_RIDER R2 1 1
6+
MATCH R1
7+
MATCH R2
8+
START_RIDE RIDE-101 1 R1
9+
START_RIDE RIDE-102 1 R2
10+
STOP_RIDE RIDE-101 10 2 48
11+
STOP_RIDE RIDE-102 7 9 50
12+
BILL RIDE-101
13+
BILL RIDE-102

Input2.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
ADD_DRIVER D1 1 1
2+
ADD_DRIVER D2 4 5
3+
ADD_DRIVER D3 2 2
4+
ADD_RIDER R1 0 0
5+
MATCH R1
6+
START_RIDE RIDE-001 2 R1
7+
STOP_RIDE RIDE-001 4 5 32
8+
BILL RIDE-001

Input3.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ADD_RIDER R1 0 0
2+
MATCH R1
3+
START_RIDE RIDE-001 2 R1
4+
STOP_RIDE RIDE-001 4 5 32
5+
BILL RIDE-001

Input4.txt

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
ADD_RIDER R1 3 3
2+
ADD_DRIVER D1 1 2
3+
MATCH R1
4+
ADD_DRIVER D2 7 4
5+
ADD_RIDER R2 2 2
6+
ADD_DRIVER D3 3 5
7+
MATCH R1
8+
START_RIDE RIDE-001 2 R1
9+
ADD_RIDER R3 1 1
10+
ADD_DRIVER D4 6 5
11+
ADD_DRIVER D5 0 0
12+
ADD_DRIVER D6 1 3
13+
ADD_DRIVER D7 2 4
14+
MATCH R2
15+
MATCH R3
16+
STOP_RIDE RIDE-001 4 5 8
17+
START_RIDE RIDE-002 2 R2
18+
START_RIDE RIDE-003 2 R3
19+
BILL RIDE-001
20+
STOP_RIDE RIDE-002 2 3 5
21+
STOP_RIDE RIDE-003 1 1 1
22+
BILL RIDE-003
23+
BILL RIDE-002

Input5.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ADD_RIDER R1 -1 5
2+
MATCH R1
3+
ADD_DRIVER D1 -3 1
4+
MATCH R1
5+
ADD_DRIVER D2 -5 6
6+
ADD_RIDER R2 0 0
7+
MATCH R1
8+
ADD_DRIVER D13 1 -8
9+
ADD_DRIVER D4 3 -6
10+
ADD_DRIVER D14 -1 -2
11+
ADD_DRIVER D15 -1 2
12+
ADD_DRIVER D16 1 -2
13+
MATCH R2
14+
MATCH R1
15+
ADD_DRIVER D17 1 2
16+
START_RIDE RIDE-001 1 R1
17+
MATCH R2
18+
STOP_RIDE RIDE-001 4 15 75
19+
BILL RIDE-001
20+
START_RIDE RIDE-002 3 R2
21+
STOP_RIDE RIDE-002 -4 -15 108
22+
START_RIDE RIDE-002 1 R2
23+
BILL RIDE-002
24+
STOP_RIDE RIDE-002 -4 -15 108
25+
BILL RIDE-002

Input6.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ADD_RIDER R1 2 7
2+
MATCH R1
3+
ADD_DRIVER D1 3 1
4+
ADD_DRIVER D2 5 6
5+
ADD_DRIVER D13 1 8
6+
ADD_DRIVER D4 3 6
7+
MATCH R1
8+
START_RIDE RIDE-001 1 R1
9+
STOP_RIDE RIDE-001 4 15 60
10+
BILL RIDE-001

README.md

+33

bin/main/application.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.83 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
786 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
837 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2.07 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

build.gradle

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
plugins {
2+
id 'java'
3+
id 'jacoco'
4+
id 'application'
5+
}
6+
7+
group = 'com.geektrust'
8+
version = '1.0'
9+
sourceCompatibility = 1.8
10+
targetCompatibility = 1.8
11+
12+
jacoco { //Please do not change this
13+
toolVersion = "0.8.4"
14+
reportsDir = file("$buildDir/jacoco")
15+
}
16+
17+
jacocoTestReport { //Please do not change this
18+
reports {
19+
xml.enabled true
20+
csv.enabled false
21+
html.enabled false
22+
xml.destination file("./jacoco.xml")
23+
}
24+
}
25+
26+
application {
27+
mainClassName = 'com.geektrust.backend.App'
28+
}
29+
30+
jar {
31+
archiveBaseName = 'geektrust' //Please do not change this final artifact name
32+
version = null //Please do not change this final artifact version
33+
manifest {
34+
attributes 'Main-Class' : 'com.geektrust.backend.App' //Change this to the main class of your program which will be executed
35+
}
36+
// To create a single jar with all dependencies.
37+
from {
38+
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
39+
} {
40+
exclude "META-INF/*.SF"
41+
exclude "META-INF/*.DSA"
42+
exclude "META-INF/*.RSA"
43+
}
44+
}
45+
46+
repositories {
47+
mavenCentral()
48+
}
49+
50+
dependencies {
51+
testCompile 'org.mockito:mockito-junit-jupiter:3.3.3'
52+
// testCompile 'org.junit.jupiter:junit-jupiter:5.4.2'
53+
testCompile 'org.mockito:mockito-junit-jupiter:3.11.1'
54+
testCompile 'org.junit.jupiter:junit-jupiter:5.7.2'
55+
}
56+
57+
test { ///Please do not change this
58+
useJUnitPlatform()
59+
testLogging {
60+
events "PASSED", "SKIPPED", "FAILED", "STANDARD_ERROR"
61+
}
62+
finalizedBy jacocoTestReport // report is always generated after tests run
63+
afterSuite { desc, result ->
64+
if (!desc.parent)
65+
println("${result.resultType} " +
66+
"(${result.testCount} tests, " +
67+
"${result.successfulTestCount} successes, " +
68+
"${result.failedTestCount} failures, " +
69+
"${result.skippedTestCount} skipped)")
70+
}
71+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

build/distributions/backend-1.0.tar

60 KB
Binary file not shown.

build/distributions/backend-1.0.zip

39.8 KB
Binary file not shown.

build/jacoco/test.exec

101 KB
Binary file not shown.

build/libs/geektrust.jar

44.9 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
5+
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
6+
<title>Test results - AddDriverCommandTest</title>
7+
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
8+
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
9+
<script src="../js/report.js" type="text/javascript"></script>
10+
</head>
11+
<body>
12+
<div id="content">
13+
<h1>AddDriverCommandTest</h1>
14+
<div class="breadcrumbs">
15+
<a href="../index.html">all</a> &gt;
16+
<a href="../packages/com.geektrust.backend.commands.html">com.geektrust.backend.commands</a> &gt; AddDriverCommandTest</div>
17+
<div id="summary">
18+
<table>
19+
<tr>
20+
<td>
21+
<div class="summaryGroup">
22+
<table>
23+
<tr>
24+
<td>
25+
<div class="infoBox" id="tests">
26+
<div class="counter">2</div>
27+
<p>tests</p>
28+
</div>
29+
</td>
30+
<td>
31+
<div class="infoBox" id="failures">
32+
<div class="counter">0</div>
33+
<p>failures</p>
34+
</div>
35+
</td>
36+
<td>
37+
<div class="infoBox" id="ignored">
38+
<div class="counter">0</div>
39+
<p>ignored</p>
40+
</div>
41+
</td>
42+
<td>
43+
<div class="infoBox" id="duration">
44+
<div class="counter">1.482s</div>
45+
<p>duration</p>
46+
</div>
47+
</td>
48+
</tr>
49+
</table>
50+
</div>
51+
</td>
52+
<td>
53+
<div class="infoBox success" id="successRate">
54+
<div class="percent">100%</div>
55+
<p>successful</p>
56+
</div>
57+
</td>
58+
</tr>
59+
</table>
60+
</div>
61+
<div id="tabs">
62+
<ul class="tabLinks">
63+
<li>
64+
<a href="#tab0">Tests</a>
65+
</li>
66+
<li>
67+
<a href="#tab1">Standard output</a>
68+
</li>
69+
</ul>
70+
<div id="tab0" class="tab">
71+
<h2>Tests</h2>
72+
<table>
73+
<thead>
74+
<tr>
75+
<th>Test</th>
76+
<th>Duration</th>
77+
<th>Result</th>
78+
</tr>
79+
</thead>
80+
<tr>
81+
<td class="success">addDriverExecutedSuccessfully()</td>
82+
<td class="success">0.007s</td>
83+
<td class="success">passed</td>
84+
</tr>
85+
<tr>
86+
<td class="success">testDriverAlreadyPresentExceptionIsThrown()</td>
87+
<td class="success">1.475s</td>
88+
<td class="success">passed</td>
89+
</tr>
90+
</table>
91+
</div>
92+
<div id="tab1" class="tab">
93+
<h2>Standard output</h2>
94+
<span class="code">
95+
<pre>Driver with this id is already present
96+
</pre>
97+
</span>
98+
</div>
99+
</div>
100+
<div id="footer">
101+
<p>
102+
<div>
103+
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
104+
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
105+
</label>
106+
</div>Generated by
107+
<a href="http://www.gradle.org">Gradle 5.1</a> at Jun 6, 2023, 6:15:21 PM</p>
108+
</div>
109+
</div>
110+
</body>
111+
</html>

0 commit comments

Comments
 (0)