Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Team 5 - Smart Towns
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rhys Evans
Team 5 - Smart Towns
Commits
518c6b09
Commit
518c6b09
authored
1 year ago
by
Rhys Evans
Browse files
Options
Downloads
Patches
Plain Diff
Commiting to cehckout main
parent
7587d180
No related branches found
No related tags found
1 merge request
!34
Resolve "As a user, I would like a town specific page which shows all trails for that town so that I can easily see my progress"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build.gradle
+1
-3
1 addition, 3 deletions
build.gradle
src/test/java/Team5/SmartTowns/DBUnitTestCase.java
+5
-3
5 additions, 3 deletions
src/test/java/Team5/SmartTowns/DBUnitTestCase.java
src/test/java/Team5/SmartTowns/Test5.java
+36
-36
36 additions, 36 deletions
src/test/java/Team5/SmartTowns/Test5.java
with
42 additions
and
42 deletions
build.gradle
+
1
−
3
View file @
518c6b09
...
...
@@ -36,9 +36,7 @@ dependencies {
testImplementation
'org.springframework.boot:spring-boot-starter-test'
implementation
'org.springframework.boot:spring-boot-starter-validation'
// https://mvnrepository.com/artifact/org.springframework/spring-dao
// https://mvnrepository.com/artifact/org.springframework/spring-dao
implementation
group:
'org.springframework'
,
name:
'spring-tx'
,
version:
'6.1.1'
implementation
'org.springframework:spring-dao:2.0.8'
// implementation group: 'org.springframework', name: 'spring-tx', version: '6.1.1'
implementation
'org.springframework:spring-dao:2.0.8'
// implementation 'org.springframework.dao.DataAccessException'
// https://mvnrepository.com/artifact/org.springframework/spring-core
...
...
This diff is collapsed.
Click to expand it.
src/test/java/Team5/SmartTowns/DBUnitTestCase.java
+
5
−
3
View file @
518c6b09
package
Team5.SmartTowns
;
//import org.junit.jupiter.api.Test;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.testng.annotations.Test
;
import
org.junit.jupiter.api.Test
;
//import org.springframework.boot.test.context.SpringBootTest;
//import org.testng.annotations.Test;
//import org.testng.annotations.Test;
//import org.apiguardian.api;
//import org.junit.platform.engine.TestDescriptor;
//import static org.junit.jupiter.api.Assertions.assertEquals;
import
static
org
.
testng
.
AssertJUnit
.
assertEquals
;
...
...
This diff is collapsed.
Click to expand it.
src/test/java/Team5/SmartTowns/Test5.java
+
36
−
36
View file @
518c6b09
package
Team5.SmartTowns
;
import
Team5.SmartTowns.Data.locationRepositoryJDBC
;
//import org.junit.jupiter.api.Test;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.autoconfigure.jdbc.JdbcTest
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.test.context.jdbc.Sql
;
import
org.testng.annotations.Test
;
//import static org.junit.jupiter.api.Assertions.assertEquals;
import
static
org
.
testng
.
Assert
.
assertEquals
;
@SpringBootTest
@JdbcTest
@Sql
({
"schema.sql"
,
"data.sql"
})
public
class
Test5
{
@Autowired
private
JdbcTemplate
ajdbc
;
@Test
// test 1
void
whenInjectInMemoryDataSource_thenReturnCorrectEmployeeCount
()
{
locationRepositoryJDBC
employeeDAO
=
new
locationRepositoryJDBC
(
ajdbc
);
// employeeDAO.setJdbc(ajdbc);
assertEquals
(
4
,
employeeDAO
.
getAllLocation
().
size
());
}
}
//
package Team5.SmartTowns;
//
//
import Team5.SmartTowns.Data.locationRepositoryJDBC;
//
//import org.junit.jupiter.api.Test;
//
import org.springframework.beans.factory.annotation.Autowired;
//
import org.springframework.boot.test.autoconfigure.jdbc.JdbcTest;
//
import org.springframework.boot.test.context.SpringBootTest;
//
import org.springframework.jdbc.core.JdbcTemplate;
//
import org.springframework.test.context.jdbc.Sql;
//
import org.testng.annotations.Test;
//
//
//import static org.junit.jupiter.api.Assertions.assertEquals;
//
import static org.testng.Assert.assertEquals;
//
//
@SpringBootTest
//
@JdbcTest
//
//
@Sql({"schema.sql", "data.sql"})
//
public class Test5 {
//
//
@Autowired
//
private JdbcTemplate ajdbc;
//
//
//
@Test
//
// test 1
//
void whenInjectInMemoryDataSource_thenReturnCorrectEmployeeCount() {
//
locationRepositoryJDBC employeeDAO = new locationRepositoryJDBC(ajdbc);
//
// employeeDAO.setJdbc(ajdbc);
//
assertEquals(4, employeeDAO.getAllLocation().size());
//
//
}
//
//
//
//
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment