Skip to content

Commit 804671b

Browse files
author
eugenp
committed
integration testing work and consolidation; empty String test added
1 parent 1b3595a commit 804671b

14 files changed

Lines changed: 262 additions & 189 deletions

File tree

‎api/src/main/java/org/rest/sec/model/Principal.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public String getName() {
7272
return name;
7373
}
7474

75+
@Override
7576
public void setName(final String nameToSet) {
7677
name = nameToSet;
7778
}

‎api/src/main/java/org/rest/sec/model/Privilege.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public String getName() {
5151
return name;
5252
}
5353

54+
@Override
5455
public void setName(final String nameToSet) {
5556
name = nameToSet;
5657
}

‎api/src/main/java/org/rest/sec/model/Role.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public String getName() {
7373
return name;
7474
}
7575

76+
@Override
7677
public void setName(final String nameToSet) {
7778
name = nameToSet;
7879
}

‎api/src/main/java/org/rest/sec/model/dto/User.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public String getName() {
6767
return name;
6868
}
6969

70+
@Override
7071
public void setName(final String nameToSet) {
7172
name = nameToSet;
7273
}

‎common/.settings/org.eclipse.jdt.ui.prefs‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@ sp_cleanup.add_missing_override_annotations=true
1111
sp_cleanup.add_missing_override_annotations_interface_methods=true
1212
sp_cleanup.add_serial_version_id=false
1313
sp_cleanup.always_use_blocks=true
14-
sp_cleanup.always_use_parentheses_in_expressions=false
14+
sp_cleanup.always_use_parentheses_in_expressions=true
1515
sp_cleanup.always_use_this_for_non_static_field_access=false
1616
sp_cleanup.always_use_this_for_non_static_method_access=false
17-
sp_cleanup.convert_to_enhanced_for_loop=false
18-
sp_cleanup.correct_indentation=false
17+
sp_cleanup.convert_to_enhanced_for_loop=true
18+
sp_cleanup.correct_indentation=true
1919
sp_cleanup.format_source_code=true
20-
sp_cleanup.format_source_code_changes_only=false
21-
sp_cleanup.make_local_variable_final=false
22-
sp_cleanup.make_parameters_final=false
23-
sp_cleanup.make_private_fields_final=true
20+
sp_cleanup.format_source_code_changes_only=true
21+
sp_cleanup.make_local_variable_final=true
22+
sp_cleanup.make_parameters_final=true
23+
sp_cleanup.make_private_fields_final=false
2424
sp_cleanup.make_type_abstract_if_missing_method=false
2525
sp_cleanup.make_variable_declarations_final=true
2626
sp_cleanup.never_use_blocks=false
27-
sp_cleanup.never_use_parentheses_in_expressions=true
28-
sp_cleanup.on_save_use_additional_actions=false
27+
sp_cleanup.never_use_parentheses_in_expressions=false
28+
sp_cleanup.on_save_use_additional_actions=true
2929
sp_cleanup.organize_imports=true
3030
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
3131
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
3232
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
33-
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
33+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
3434
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
3535
sp_cleanup.remove_private_constructors=true
36-
sp_cleanup.remove_trailing_whitespaces=false
36+
sp_cleanup.remove_trailing_whitespaces=true
3737
sp_cleanup.remove_trailing_whitespaces_all=true
3838
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
3939
sp_cleanup.remove_unnecessary_casts=true
4040
sp_cleanup.remove_unnecessary_nls_tags=false
41-
sp_cleanup.remove_unused_imports=false
41+
sp_cleanup.remove_unused_imports=true
4242
sp_cleanup.remove_unused_local_variables=false
4343
sp_cleanup.remove_unused_private_fields=true
4444
sp_cleanup.remove_unused_private_members=false
@@ -49,7 +49,7 @@ sp_cleanup.sort_members_all=false
4949
sp_cleanup.use_blocks=false
5050
sp_cleanup.use_blocks_only_for_return_and_throw=false
5151
sp_cleanup.use_parentheses_in_expressions=false
52-
sp_cleanup.use_this_for_non_static_field_access=false
52+
sp_cleanup.use_this_for_non_static_field_access=true
5353
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
54-
sp_cleanup.use_this_for_non_static_method_access=false
54+
sp_cleanup.use_this_for_non_static_method_access=true
5555
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

‎common/src/main/java/org/rest/common/persistence/model/INameableEntity.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ public interface INameableEntity extends IEntity {
44

55
String getName();
66

7+
void setName(final String nameToSet);
8+
79
}

‎common/src/test/java/org/rest/common/util/ParseQueryStringUnitTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ public final void givenQueryContainsValidNegatedIdAndPositiveNameConstraint_when
145145
public final void givenQueryContainsValidNegatedIdAndPositiveNameConstraint_whenQueryIsParsed_thenResultsAreCorrect() {
146146
final String id = randomNumeric(2);
147147
final String name = randomAlphabetic(6);
148-
final List<Triple<String, ClientOperation, String>> parsedQueryString = parseQueryString(QueryConstants.ID + QueryConstants.NEGATION + QueryConstants.OP + id + QueryConstants.SEPARATOR
149-
+ QueryConstants.NAME + QueryConstants.OP + name);
148+
final List<Triple<String, ClientOperation, String>> parsedQueryString = parseQueryString(QueryConstants.ID + QueryConstants.NEGATION + QueryConstants.OP + id + QueryConstants.SEPARATOR + QueryConstants.NAME
149+
+ QueryConstants.OP + name);
150150

151151
assertEquals(id, parsedQueryString.get(0).getRight());
152152
assertEquals(name, parsedQueryString.get(1).getRight());

‎sandbox/.settings/org.eclipse.jdt.ui.prefs‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,34 @@ sp_cleanup.add_missing_override_annotations=true
1111
sp_cleanup.add_missing_override_annotations_interface_methods=true
1212
sp_cleanup.add_serial_version_id=false
1313
sp_cleanup.always_use_blocks=true
14-
sp_cleanup.always_use_parentheses_in_expressions=false
14+
sp_cleanup.always_use_parentheses_in_expressions=true
1515
sp_cleanup.always_use_this_for_non_static_field_access=false
1616
sp_cleanup.always_use_this_for_non_static_method_access=false
17-
sp_cleanup.convert_to_enhanced_for_loop=false
18-
sp_cleanup.correct_indentation=false
17+
sp_cleanup.convert_to_enhanced_for_loop=true
18+
sp_cleanup.correct_indentation=true
1919
sp_cleanup.format_source_code=true
20-
sp_cleanup.format_source_code_changes_only=false
21-
sp_cleanup.make_local_variable_final=false
22-
sp_cleanup.make_parameters_final=false
23-
sp_cleanup.make_private_fields_final=true
20+
sp_cleanup.format_source_code_changes_only=true
21+
sp_cleanup.make_local_variable_final=true
22+
sp_cleanup.make_parameters_final=true
23+
sp_cleanup.make_private_fields_final=false
2424
sp_cleanup.make_type_abstract_if_missing_method=false
2525
sp_cleanup.make_variable_declarations_final=true
2626
sp_cleanup.never_use_blocks=false
27-
sp_cleanup.never_use_parentheses_in_expressions=true
28-
sp_cleanup.on_save_use_additional_actions=false
27+
sp_cleanup.never_use_parentheses_in_expressions=false
28+
sp_cleanup.on_save_use_additional_actions=true
2929
sp_cleanup.organize_imports=true
3030
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
3131
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
3232
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
33-
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
33+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
3434
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
3535
sp_cleanup.remove_private_constructors=true
36-
sp_cleanup.remove_trailing_whitespaces=false
36+
sp_cleanup.remove_trailing_whitespaces=true
3737
sp_cleanup.remove_trailing_whitespaces_all=true
3838
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
3939
sp_cleanup.remove_unnecessary_casts=true
4040
sp_cleanup.remove_unnecessary_nls_tags=false
41-
sp_cleanup.remove_unused_imports=false
41+
sp_cleanup.remove_unused_imports=true
4242
sp_cleanup.remove_unused_local_variables=false
4343
sp_cleanup.remove_unused_private_fields=true
4444
sp_cleanup.remove_unused_private_members=false
@@ -49,7 +49,7 @@ sp_cleanup.sort_members_all=false
4949
sp_cleanup.use_blocks=false
5050
sp_cleanup.use_blocks_only_for_return_and_throw=false
5151
sp_cleanup.use_parentheses_in_expressions=false
52-
sp_cleanup.use_this_for_non_static_field_access=false
52+
sp_cleanup.use_this_for_non_static_field_access=true
5353
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
54-
sp_cleanup.use_this_for_non_static_method_access=false
54+
sp_cleanup.use_this_for_non_static_method_access=true
5555
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

‎sec/eclipse/INTEGRATION-SINGLE.launch‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
22
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
33
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
4-
<listEntry value="/rest-sec/src/test/java/org/rest/sec/test/suite/client/IntegrationClientRestTestSuite.java"/>
4+
<listEntry value="/rest-sec/src/test/java/org/rest/sec/persistence/service/PrivilegeServicePersistenceIntegrationTest.java"/>
55
</listAttribute>
66
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
77
<listEntry value="1"/>
@@ -14,7 +14,7 @@
1414
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
1515
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
1616
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
17-
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.rest.sec.test.suite.client.IntegrationClientRestTestSuite"/>
17+
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.rest.sec.persistence.service.PrivilegeServicePersistenceIntegrationTest"/>
1818
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="rest-sec"/>
1919
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
2020
</launchConfiguration>
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
eclipse.preferences.version=1
22
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
3+
formatter_settings_version=12
34
sp_cleanup.add_default_serial_version_id=true
45
sp_cleanup.add_generated_serial_version_id=false
56
sp_cleanup.add_missing_annotations=true
@@ -10,34 +11,34 @@ sp_cleanup.add_missing_override_annotations=true
1011
sp_cleanup.add_missing_override_annotations_interface_methods=true
1112
sp_cleanup.add_serial_version_id=false
1213
sp_cleanup.always_use_blocks=true
13-
sp_cleanup.always_use_parentheses_in_expressions=false
14+
sp_cleanup.always_use_parentheses_in_expressions=true
1415
sp_cleanup.always_use_this_for_non_static_field_access=false
1516
sp_cleanup.always_use_this_for_non_static_method_access=false
16-
sp_cleanup.convert_to_enhanced_for_loop=false
17-
sp_cleanup.correct_indentation=false
17+
sp_cleanup.convert_to_enhanced_for_loop=true
18+
sp_cleanup.correct_indentation=true
1819
sp_cleanup.format_source_code=true
19-
sp_cleanup.format_source_code_changes_only=false
20-
sp_cleanup.make_local_variable_final=false
21-
sp_cleanup.make_parameters_final=false
22-
sp_cleanup.make_private_fields_final=true
20+
sp_cleanup.format_source_code_changes_only=true
21+
sp_cleanup.make_local_variable_final=true
22+
sp_cleanup.make_parameters_final=true
23+
sp_cleanup.make_private_fields_final=false
2324
sp_cleanup.make_type_abstract_if_missing_method=false
2425
sp_cleanup.make_variable_declarations_final=true
2526
sp_cleanup.never_use_blocks=false
26-
sp_cleanup.never_use_parentheses_in_expressions=true
27-
sp_cleanup.on_save_use_additional_actions=false
27+
sp_cleanup.never_use_parentheses_in_expressions=false
28+
sp_cleanup.on_save_use_additional_actions=true
2829
sp_cleanup.organize_imports=true
2930
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
3031
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
3132
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
32-
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
33+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
3334
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
3435
sp_cleanup.remove_private_constructors=true
35-
sp_cleanup.remove_trailing_whitespaces=false
36+
sp_cleanup.remove_trailing_whitespaces=true
3637
sp_cleanup.remove_trailing_whitespaces_all=true
3738
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
3839
sp_cleanup.remove_unnecessary_casts=true
3940
sp_cleanup.remove_unnecessary_nls_tags=false
40-
sp_cleanup.remove_unused_imports=false
41+
sp_cleanup.remove_unused_imports=true
4142
sp_cleanup.remove_unused_local_variables=false
4243
sp_cleanup.remove_unused_private_fields=true
4344
sp_cleanup.remove_unused_private_members=false
@@ -48,7 +49,7 @@ sp_cleanup.sort_members_all=false
4849
sp_cleanup.use_blocks=false
4950
sp_cleanup.use_blocks_only_for_return_and_throw=false
5051
sp_cleanup.use_parentheses_in_expressions=false
51-
sp_cleanup.use_this_for_non_static_field_access=false
52+
sp_cleanup.use_this_for_non_static_field_access=true
5253
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
53-
sp_cleanup.use_this_for_non_static_method_access=false
54+
sp_cleanup.use_this_for_non_static_method_access=true
5455
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

0 commit comments

Comments
 (0)