Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#3] controller, dto 생성, Test 코드 작성 #4

Merged
merged 7 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Gradle ###
.gradle/
/build/
**/build/

### 로그 ###
*.log
Expand Down
2 changes: 2 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.4'
id 'io.spring.dependency-management' version '1.1.6'
}
Expand All @@ -10,4 +11,5 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.apache.ant:ant:1.10.13'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 라이브러리는 왜 필요했을까요?

}
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
<!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 - AlertControllerTest</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>AlertControllerTest</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/com.whalewatch.controller.html">com.whalewatch.controller</a> &gt; AlertControllerTest</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">2</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.532s</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">getAlertSettings()</td>
<td class="success">0.017s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">updateAlertSettings()</td>
<td class="success">0.515s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
<div id="tab1" class="tab">
<h2>Standard output</h2>
<span class="code">
<pre>20:19:20.171 [Test worker] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.whalewatch.controller.AlertControllerTest]: AlertControllerTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
20:19:20.240 [Test worker] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.whalewatch.WhaleWatchApplication for test class com.whalewatch.controller.AlertControllerTest

. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/

:: Spring Boot :: (v3.3.4)

2024-12-11T20:19:20.397+09:00 INFO 71176 --- [ Test worker] c.w.controller.AlertControllerTest : Starting AlertControllerTest using Java 17.0.9 with PID 71176 (started by junmo in /Users/junmo/Desktop/study/project/WhaleWatch/api)
2024-12-11T20:19:20.397+09:00 INFO 71176 --- [ Test worker] c.w.controller.AlertControllerTest : No active profile set, falling back to 1 default profile: &quot;default&quot;
2024-12-11T20:19:20.746+09:00 INFO 71176 --- [ Test worker] o.s.b.t.m.w.SpringBootMockServletContext : Initializing Spring TestDispatcherServlet ''
2024-12-11T20:19:20.746+09:00 INFO 71176 --- [ Test worker] o.s.t.web.servlet.TestDispatcherServlet : Initializing Servlet ''
2024-12-11T20:19:20.747+09:00 INFO 71176 --- [ Test worker] o.s.t.web.servlet.TestDispatcherServlet : Completed initialization in 1 ms
2024-12-11T20:19:20.762+09:00 INFO 71176 --- [ Test worker] c.w.controller.AlertControllerTest : Started AlertControllerTest in 0.484 seconds (process running for 1.048)
</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 8.2.1</a> at 2024. 12. 11. 오후 8:19:21</p>
</div>
</div>
</body>
</html>
179 changes: 179 additions & 0 deletions api/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
Loading