diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-07-28 05:33:33 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-07-28 11:17:54 +0400 |
commit | b56b994e0e67043be18cf5803474ed01ffed100f (patch) | |
tree | 43fdc8cf8f3517c9262b54098b84ac2f8fbbb4bb /sonar-core/src/test | |
parent | b0e768ada85207c3ac6424b069e0dbc4e162c9db (diff) | |
download | sonarqube-b56b994e0e67043be18cf5803474ed01ffed100f.tar.gz sonarqube-b56b994e0e67043be18cf5803474ed01ffed100f.zip |
SONAR-2596 Reduce number of arguments for NotificationService constructor
Diffstat (limited to 'sonar-core/src/test')
2 files changed, 15 insertions, 0 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java b/sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java index 70587fa8493..ae661ae43cc 100644 --- a/sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java +++ b/sonar-core/src/test/java/org/sonar/core/notifications/DefaultNotificationManagerTest.java @@ -49,4 +49,11 @@ public class DefaultNotificationManagerTest extends AbstractDbUnitTestCase { assertThat(manager.getFromQueue(), nullValue()); } + @Test + public void shouldCheckEnablement() { + setupData("fixture"); + assertThat(manager.isEnabled("simon", "email", "CommentOnReviewAssignedToMe"), is(true)); + assertThat(manager.isEnabled("godin", "email", "CommentOnReviewAssignedToMe"), is(false)); + } + } diff --git a/sonar-core/src/test/resources/org/sonar/core/notifications/DefaultNotificationManagerTest/fixture.xml b/sonar-core/src/test/resources/org/sonar/core/notifications/DefaultNotificationManagerTest/fixture.xml new file mode 100644 index 00000000000..7933d24446d --- /dev/null +++ b/sonar-core/src/test/resources/org/sonar/core/notifications/DefaultNotificationManagerTest/fixture.xml @@ -0,0 +1,8 @@ +<dataset> + + <users id="1" login="simon" /> + <users id="2" login="godin" /> + + <properties user_id="1" prop_key="notification.CommentOnReviewAssignedToMe.email" text_value="true"/> + +</dataset>
\ No newline at end of file |