Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
semint-kprime-arm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Pedot Nicola
semint-kprime-arm
Commits
4402f840
Commit
4402f840
authored
4 years ago
by
npedot
Browse files
Options
Downloads
Patches
Plain Diff
adds test mapping oneline with where condition
parent
35f8ef3a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/kotlin/unibz.cs.semint.kprime/domain/MappingTest.kt
+17
-0
17 additions, 0 deletions
src/test/kotlin/unibz.cs.semint.kprime/domain/MappingTest.kt
with
17 additions
and
0 deletions
src/test/kotlin/unibz.cs.semint.kprime/domain/MappingTest.kt
+
17
−
0
View file @
4402f840
...
@@ -136,6 +136,23 @@ WHERE DepName is not null and DepAddress is not null LIMIT 10
...
@@ -136,6 +136,23 @@ WHERE DepName is not null and DepAddress is not null LIMIT 10
"""
.
trimIndent
(),
actualSQL
)
"""
.
trimIndent
(),
actualSQL
)
}
}
@Test
fun
test_mapping_with_where_oneline
()
{
// given
val
sqlQuery
=
"select SSN,DepName,DepAddress from table0 where DepName is not null and DepAddress is not null"
// when
val
mapping
=
UnSQLizeSelectUseCase
().
fromsql
(
"query1"
,
sqlQuery
)
val
actualSQL
=
SQLizeCreateUseCase
().
createViewCommand
(
mapping
)
// then
assertEquals
(
"DepName is not null and DepAddress is not null"
,
mapping
.
select
.
where
.
condition
)
assertEquals
(
"""
CREATE OR REPLACE VIEW public.query1 AS
SELECT SSN,DepName,DepAddress
FROM table0
WHERE DepName is not null and DepAddress is not null LIMIT 10
"""
.
trimIndent
(),
actualSQL
)
}
@Test
@Test
fun
test_multi_join
()
{
fun
test_multi_join
()
{
// given
// given
...
...
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