Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
GowthamanT authored Oct 28, 2020
1 parent 956544d commit d16c2c9
Show file tree
Hide file tree
Showing 29 changed files with 1,412 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Business Logic.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@PostMapping(value = "/ride", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ThemeParkRide createRide(@Valid @RequestBody ThemeParkRide themeParkRide) {
return themeParkRideRepository.save(themeParkRide);
}

@PostMapping(value = "/ride/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ThemeParkRide postRide(@PathVariable long id){
return themeParkRideRepository.findById(id).orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND, String.format("Invalid ride id %s", id)));
}
29 changes: 29 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plugins {
id 'java'
id 'io.spring.dependency-management' version "1.0.10.RELEASE"
id 'org.springframework.boot' version '2.3.4.RELEASE'
id 'pl.allegro.tech.build.axion-release' version '1.12.0'
}

repositories {
mavenCentral()
jcenter()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-devtools'
implementation group: 'com.h2database', name: 'h2', version: '1.4.200'

compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

test {
useJUnitPlatform()
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
153 changes: 153 additions & 0 deletions build/reports/tests/test/classes/com.tg.ThemeParkApplicationIT.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - ThemeParkApplicationIT</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>ThemeParkApplicationIT</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/com.tg.html">com.tg</a> &gt; ThemeParkApplicationIT</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">3</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.447s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Tests</a>
</li>
<li>
<a href="#tab1">Standard output</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="success">getsAllRides</td>
<td class="success">0.399s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">getsSingleRide</td>
<td class="success">0.036s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">returnsNotFoundForInvalidSingleRide</td>
<td class="success">0.012s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
<div id="tab1" class="tab">
<h2>Standard output</h2>
<span class="code">
<pre>11:24:23.672 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.tg.ThemeParkApplicationIT]
11:24:23.672 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.tg.ThemeParkApplicationIT]
11:24:23.672 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.tg.ThemeParkApplicationIT]
11:24:23.672 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.tg.ThemeParkApplicationIT]
11:24:23.682 [Test worker] DEBUG org.springframework.test.context.support.AbstractDirtiesContextTestExecutionListener - Before test class: context [DefaultTestContext@2967ef23 testClass = ThemeParkApplicationIT, testInstance = [null], testMethod = [null], testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@76e2ee2e testClass = ThemeParkApplicationIT, locations = '{}', classes = '{class com.tg.ThemeParkApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@4b3fa0b3, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@6287e76d, [ImportsContextCustomizer@7412637e key = [org.springframework.boot.test.autoconfigure.web.servlet.MockMvcAutoConfiguration, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcWebClientAutoConfiguration, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcWebDriverAutoConfiguration, org.springframework.boot.autoconfigure.security.oauth2.client.servlet.OAuth2ClientAutoConfiguration, org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityFilterAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcSecurityConfiguration]], org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@70d73c23, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@3f646a39, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@4c89f6cd, org.springframework.boot.test.context.SpringBootTestArgs@1], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -&gt; true]], class annotated with @DirtiesContext [false] with mode [null].
11:24:23.685 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved @ProfileValueSourceConfiguration [null] for test class [com.tg.ThemeParkApplicationIT]
11:24:23.686 [Test worker] DEBUG org.springframework.test.annotation.ProfileValueUtils - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [com.tg.ThemeParkApplicationIT]
11:24:23.715 [Test worker] DEBUG org.springframework.test.context.support.TestPropertySourceUtils - Adding inlined properties to environment: {spring.jmx.enabled=false, org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}

. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.4.RELEASE)

2020-10-09 11:24:24.063 INFO 9344 --- [ Test worker] com.tg.ThemeParkApplicationIT : Starting ThemeParkApplicationIT on LAPTOP-9Q30ACUF with PID 9344 (started by happy in D:\Applications\IntelliJ IDEA Community Edition 2020.2.3\projects)
2020-10-09 11:24:24.067 INFO 9344 --- [ Test worker] com.tg.ThemeParkApplicationIT : No active profile set, falling back to default profiles: default
2020-10-09 11:24:25.113 INFO 9344 --- [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFERRED mode.
2020-10-09 11:24:25.181 INFO 9344 --- [ Test worker] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 57ms. Found 1 JPA repository interfaces.
2020-10-09 11:24:25.798 INFO 9344 --- [ Test worker] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-10-09 11:24:25.821 INFO 9344 --- [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-10-09 11:24:26.056 INFO 9344 --- [ Test worker] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-10-09 11:24:26.149 INFO 9344 --- [ task-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2020-10-09 11:24:26.222 INFO 9344 --- [ task-1] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4.21.Final
2020-10-09 11:24:26.445 INFO 9344 --- [ task-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-10-09 11:24:26.478 WARN 9344 --- [ Test worker] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-10-09 11:24:26.659 INFO 9344 --- [ task-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
2020-10-09 11:24:27.621 INFO 9344 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-10-09 11:24:27.629 INFO 9344 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-10-09 11:24:27.806 INFO 9344 --- [ Test worker] o.s.b.t.m.w.SpringBootMockServletContext : Initializing Spring TestDispatcherServlet ''
2020-10-09 11:24:27.806 INFO 9344 --- [ Test worker] o.s.t.web.servlet.TestDispatcherServlet : Initializing Servlet ''
2020-10-09 11:24:27.822 INFO 9344 --- [ Test worker] o.s.b.a.e.web.EndpointLinksResolver : Exposing 2 endpoint(s) beneath base path '/actuator'
2020-10-09 11:24:27.859 INFO 9344 --- [ Test worker] o.s.t.web.servlet.TestDispatcherServlet : Completed initialization in 52 ms
2020-10-09 11:24:27.889 INFO 9344 --- [ Test worker] DeferredRepositoryInitializationListener : Triggering deferred initialization of Spring Data repositories…
2020-10-09 11:24:28.229 INFO 9344 --- [ Test worker] DeferredRepositoryInitializationListener : Spring Data repositories initialized!
2020-10-09 11:24:28.246 INFO 9344 --- [ Test worker] com.tg.ThemeParkApplicationIT : Started ThemeParkApplicationIT in 4.519 seconds (JVM running for 6.043)
</pre>
</span>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 6.3</a> at 09-Oct-2020, 11:24:29 AM</p>
</div>
</div>
</body>
</html>
179 changes: 179 additions & 0 deletions build/reports/tests/test/css/base-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@

body {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 12pt;
}

body, a, a:visited {
color: #303030;
}

#content {
padding-left: 50px;
padding-right: 50px;
padding-top: 30px;
padding-bottom: 30px;
}

#content h1 {
font-size: 160%;
margin-bottom: 10px;
}

#footer {
margin-top: 100px;
font-size: 80%;
white-space: nowrap;
}

#footer, #footer a {
color: #a0a0a0;
}

#line-wrapping-toggle {
vertical-align: middle;
}

#label-for-line-wrapping-toggle {
vertical-align: middle;
}

ul {
margin-left: 0;
}

h1, h2, h3 {
white-space: nowrap;
}

h2 {
font-size: 120%;
}

ul.tabLinks {
padding-left: 0;
padding-top: 10px;
padding-bottom: 10px;
overflow: auto;
min-width: 800px;
width: auto !important;
width: 800px;
}

ul.tabLinks li {
float: left;
height: 100%;
list-style: none;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 0;
-moz-border-radius: 7px;
border-radius: 7px;
margin-right: 25px;
border: solid 1px #d4d4d4;
background-color: #f0f0f0;
}

ul.tabLinks li:hover {
background-color: #fafafa;
}

ul.tabLinks li.selected {
background-color: #c5f0f5;
border-color: #c5f0f5;
}

ul.tabLinks a {
font-size: 120%;
display: block;
outline: none;
text-decoration: none;
margin: 0;
padding: 0;
}

ul.tabLinks li h2 {
margin: 0;
padding: 0;
}

div.tab {
}

div.selected {
display: block;
}

div.deselected {
display: none;
}

div.tab table {
min-width: 350px;
width: auto !important;
width: 350px;
border-collapse: collapse;
}

div.tab th, div.tab table {
border-bottom: solid #d0d0d0 1px;
}

div.tab th {
text-align: left;
white-space: nowrap;
padding-left: 6em;
}

div.tab th:first-child {
padding-left: 0;
}

div.tab td {
white-space: nowrap;
padding-left: 6em;
padding-top: 5px;
padding-bottom: 5px;
}

div.tab td:first-child {
padding-left: 0;
}

div.tab td.numeric, div.tab th.numeric {
text-align: right;
}

span.code {
display: inline-block;
margin-top: 0em;
margin-bottom: 1em;
}

span.code pre {
font-size: 11pt;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
margin: 0;
background-color: #f7f7f7;
border: solid 1px #d0d0d0;
min-width: 700px;
width: auto !important;
width: 700px;
}

span.wrapped pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-all;
}

label.hidden {
display: none;
}
Loading

0 comments on commit d16c2c9

Please sign in to comment.