Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixes #54, #55, #56#57

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
PhilippSalvisberg merged 7 commits intoutPLSQL:masterfromPhilippSalvisberg:develop
Nov 25, 2018
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionsqldev/pom.xml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@
<!-- The Basics -->
<groupId>org.utplsql</groupId>
<artifactId>org.utplsql.sqldev</artifactId>
<version>0.7.0</version>
<version>0.7.1</version>
<packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
20 changes: 14 additions & 6 deletionssqldev/src/main/java/org/utplsql/sqldev/dal/UtplsqlDao.xtend
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -179,7 +179,7 @@ class UtplsqlDao {
val sql = '''
SELECT count(*)
FROM TABLE(ut_runner.get_suites_info(upper(?), upper(?)))
WHERE item_type='UT_TEST'
WHERE item_typeIN ('UT_TEST', 'UT_SUITE')
AND (item_name = upper(?) or ? IS NULL)
'''
found = jdbcTemplate.queryForObject(sql, Integer, #[owner, objectName, subobjectName, subobjectName])
Expand DownExpand Up@@ -388,6 +388,14 @@ class UtplsqlDao {
SELECT object_owner,
object_name,
path AS suitepath,
count(
CASE
WHEN item_type = 'UT_TEST' THEN
1
ELSE
NULL
END
) over (partition by object_owner, object_name) AS test_count,
item_type,
item_name,
item_description
Expand DownExpand Up@@ -416,7 +424,7 @@ class UtplsqlDao {
'Yes' AS multiselectable,
'Yes' AS relevant
FROM test
WHERE item_type='UT_TEST'
WHERE item_typeIN ('UT_TEST', 'UT_SUITE')
UNION ALL
SELECT object_owner || '.' || object_name AS parent_id,
object_owner || '.' || object_name || '.' || item_name AS id,
Expand DownExpand Up@@ -451,10 +459,10 @@ class UtplsqlDao {
object_owner || ':' || suitepath AS id,
item_name AS name,
item_description AS description,
CASE item_type
WHEN 'UT_SUITE' THEN
CASE
WHENitem_type ='UT_SUITE' AND test_count > 0 THEN
'PACKAGE_ICON'
WHEN 'UT_TEST' THEN
WHENitem_type ='UT_TEST' THEN
'PROCEDURE_ICON'
ELSE
'FOLDER_ICON'
Expand DownExpand Up@@ -492,7 +500,7 @@ class UtplsqlDao {
lower(a.name) AS name,
a.text,
a.subobject_name
FROM table(ut3.ut_annotation_manager.get_annotated_objects(user, 'PACKAGE')) o
FROM table(«utplsqlSchema».ut_annotation_manager.get_annotated_objects(user, 'PACKAGE')) o
CROSS JOIN table(o.annotations) a
WHERE lower(a.name) in ('suite', 'suitepath', 'endcontext', 'test')
OR lower(a.name) = 'context' AND regexp_like(text, '(\w+)(\.\w+)*')
Expand Down
67 changes: 66 additions & 1 deletionsqldev/src/test/java/org/utplsql/sqldev/tests/DalTest.xtend
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -328,7 +328,7 @@ class DalTest extends AbstractJdbcTest {
PROCEDURE t3;
END junit_utplsql_test_pkg;
''')
val actualNodes = dao.runnables()
val actualNodes = dao.runnables()
Assert.assertEquals(16, actualNodes.size)
val actual = new HashMap<String, String>
for (node : actualNodes) {
Expand DownExpand Up@@ -472,4 +472,69 @@ class DalTest extends AbstractJdbcTest {

}

@Test
def void issue54FolderIconForSuitesWithoutTests() {
setupAndTeardown
jdbcTemplate.execute('''
CREATE OR REPLACE PACKAGE junit_utplsql_test_pkg IS
-- %suite

END junit_utplsql_test_pkg;
''')
val dao = new UtplsqlDao(dataSource.connection)
val actualNodes = dao.runnables()
Assert.assertEquals(4, actualNodes.size)
val pkg = actualNodes.findFirst[it.id == "SCOTT:junit_utplsql_test_pkg"]
Assert.assertEquals("FOLDER_ICON", pkg.iconName)
jdbcTemplate.execute("DROP PACKAGE junit_utplsql_test_pkg")
}

@Test
def void issue54PackageIconForSuitesWithTests() {
setupAndTeardown
jdbcTemplate.execute('''
CREATE OR REPLACE PACKAGE junit_utplsql_test_pkg IS
-- %suite

-- %test
PROCEDURE t1;

END junit_utplsql_test_pkg;
''')
val dao = new UtplsqlDao(dataSource.connection)
val actualNodes = dao.runnables()
Assert.assertEquals(6, actualNodes.size)
val pkg = actualNodes.findFirst[it.id == "SCOTT:junit_utplsql_test_pkg"]
Assert.assertEquals("PACKAGE_ICON", pkg.iconName)
jdbcTemplate.execute("DROP PACKAGE junit_utplsql_test_pkg")
}

@Test
def void issue55SuiteWithoutTests() {
setupAndTeardown
jdbcTemplate.execute('''
CREATE OR REPLACE PACKAGE junit_utplsql_test_pkg IS
-- %suite

END junit_utplsql_test_pkg;
''')
val dao = new UtplsqlDao(dataSource.connection)
val actualNodes = dao.runnables()
Assert.assertEquals(4, actualNodes.size)
jdbcTemplate.execute("DROP PACKAGE junit_utplsql_test_pkg")
}

@Test
def void issue56SuiteWithoutTests() {
jdbcTemplate.execute('''
CREATE OR REPLACE PACKAGE junit_utplsql_test_pkg IS
-- %suite

END junit_utplsql_test_pkg;
''')
val dao = new UtplsqlDao(dataSource.connection)
Assert.assertTrue(dao.containsUtplsqlTest("scott", "junit_utplsql_test_pkg"))
jdbcTemplate.execute("DROP PACKAGE junit_utplsql_test_pkg")
}

}

[8]ページ先頭

©2009-2025 Movatter.jp