[prev in list] [next in list] [prev in thread] [next in thread]
List: james-dev
Subject: [13/31] james-project git commit: MAILBOX-307 Use more static imports in Rfc4314RightsTest
From: matthieu () apache ! org
Date: 2017-09-29 7:21:51
Message-ID: b86b4d3d1a7d4abfa12e6539557b974d () git ! apache ! org
[Download RAW message or body]
MAILBOX-307 Use more static imports in Rfc4314RightsTest
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/774694c8
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/774694c8
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/774694c8
Branch: refs/heads/master
Commit: 774694c81a50bca983445472d62343b04c839c38
Parents: c2a671c
Author: benwa <btellier@linagora.com>
Authored: Wed Sep 27 17:01:40 2017 +0700
Committer: Matthieu Baechler <matthieu@apache.org>
Committed: Fri Sep 29 09:20:40 2017 +0200
----------------------------------------------------------------------
.../james/mailbox/model/Rfc4314RightsTest.java | 29 ++++++++++----------
1 file changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/774694c8/mailbox/api/src/test/java/org/apache/james/mailbox/model/Rfc4314RightsTest.java
----------------------------------------------------------------------
diff --git a/mailbox/api/src/test/java/org/apache/james/mailbox/model/Rfc4314RightsTest.java \
b/mailbox/api/src/test/java/org/apache/james/mailbox/model/Rfc4314RightsTest.java \
index e5e3df3..a753e7d 100644
--- a/mailbox/api/src/test/java/org/apache/james/mailbox/model/Rfc4314RightsTest.java
+++ b/mailbox/api/src/test/java/org/apache/james/mailbox/model/Rfc4314RightsTest.java
@@ -23,6 +23,7 @@ package org.apache.james.mailbox.model;
import static org.apache.james.mailbox.model.MailboxACL.Right.Administer;
import static org.apache.james.mailbox.model.MailboxACL.Right.CreateMailbox;
import static org.apache.james.mailbox.model.MailboxACL.Right.DeleteMailbox;
+import static org.apache.james.mailbox.model.MailboxACL.Right.DeleteMessages;
import static org.apache.james.mailbox.model.MailboxACL.Right.Insert;
import static org.apache.james.mailbox.model.MailboxACL.Right.Lookup;
import static org.apache.james.mailbox.model.MailboxACL.Right.PerformExpunge;
@@ -51,21 +52,21 @@ public class Rfc4314RightsTest {
@Before
public void setUp() throws Exception {
- aeik = new MailboxACL.Rfc4314Rights("aeik");
- lprs = new MailboxACL.Rfc4314Rights("lprs");
- twx = new MailboxACL.Rfc4314Rights("twx");
+ aeik = new Rfc4314Rights("aeik");
+ lprs = new Rfc4314Rights("lprs");
+ twx = new Rfc4314Rights("twx");
full = MailboxACL.FULL_RIGHTS;
none = MailboxACL.NO_RIGHTS;
}
@Test(expected=NullPointerException.class)
public void newInstanceShouldThrowWhenNullString() throws \
UnsupportedRightException {
- new MailboxACL.Rfc4314Rights((String) null);
+ new Rfc4314Rights((String) null);
}
@Test
public void newInstanceShouldHaveNoRightsWhenEmptyString() throws \
UnsupportedRightException {
- Rfc4314Rights rights = new MailboxACL.Rfc4314Rights("");
+ Rfc4314Rights rights = new Rfc4314Rights("");
assertThat(rights.list()).isEmpty();
}
@@ -96,7 +97,7 @@ public class Rfc4314RightsTest {
@Test
public void rfc4314RightsShouldThrowWhenUnknownFlag() throws \
UnsupportedRightException {
- assertThatThrownBy(() -> new MailboxACL.Rfc4314Rights("z"))
+ assertThatThrownBy(() -> new Rfc4314Rights("z"))
.isInstanceOf(UnsupportedRightException.class);
}
@@ -116,9 +117,9 @@ public class Rfc4314RightsTest {
Post,
Read,
WriteSeenFlag,
- MailboxACL.Right.DeleteMessages,
- MailboxACL.Right.Write,
- MailboxACL.Right.DeleteMailbox);
+ DeleteMessages,
+ Write,
+ DeleteMailbox);
}
@Test
@@ -147,9 +148,9 @@ public class Rfc4314RightsTest {
@Test
public void rightsShouldContainsSpecificRightsWhenTWX() {
assertThat(twx.list()).containsOnly(
- MailboxACL.Right.DeleteMessages,
- MailboxACL.Right.Write,
- MailboxACL.Right.DeleteMailbox);
+ DeleteMessages,
+ Write,
+ DeleteMailbox);
}
@Test
@@ -164,12 +165,12 @@ public class Rfc4314RightsTest {
@Test
public void getValueShouldReturnSigmaWhenTwx() throws UnsupportedRightException \
{
- assertThat(twx.list()).containsExactly(MailboxACL.Right.DeleteMessages, \
Write, DeleteMailbox); + \
assertThat(twx.list()).containsExactly(DeleteMessages, Write, DeleteMailbox); }
@Test
public void getValueShouldReturnEmptyWhenNone() throws UnsupportedRightException \
{
- assertThat(new MailboxACL.Rfc4314Rights("").list()).isEmpty();
+ assertThat(new Rfc4314Rights("").list()).isEmpty();
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic