Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
remove fields from anonymous classes
Browse files Browse the repository at this point in the history
  • Loading branch information
iikirilov committed Aug 27, 2019
1 parent 03e7852 commit 27f1a55
Showing 1 changed file with 10 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,12 @@ public void verifyCreatePrivacyGroupWithoutDescription() {
final Object[] params =
new Object[] {
new Object() {
private final String[] addresses = ADDRESSES;
private final String name = NAME;

public String[] getAddresses() {
return addresses;
return ADDRESSES;
}

public String getName() {
return name;
return NAME;
}
}
};
Expand All @@ -117,7 +114,7 @@ public String getName() {
}

@Test
public void verifyCreatePrivacyGroupWithoutName() throws Exception {
public void verifyCreatePrivacyGroupWithoutName() {

final String expected = "a wonderful group";
final PrivacyGroup privacyGroup =
Expand All @@ -131,15 +128,12 @@ public void verifyCreatePrivacyGroupWithoutName() throws Exception {
final Object[] params =
new Object[] {
new Object() {
private final String[] addresses = ADDRESSES;
private final String description = DESCRIPTION;

public String[] getAddresses() {
return addresses;
return ADDRESSES;
}

public String getDescription() {
return description;
return DESCRIPTION;
}
}
};
Expand All @@ -155,7 +149,7 @@ public String getDescription() {
}

@Test
public void verifyCreatePrivacyGroupWithoutOptionalParams() throws Exception {
public void verifyCreatePrivacyGroupWithoutOptionalParams() {

final String expected = "a wonderful group";
final PrivacyGroup privacyGroup =
Expand All @@ -169,10 +163,8 @@ public void verifyCreatePrivacyGroupWithoutOptionalParams() throws Exception {
final Object[] params =
new Object[] {
new Object() {
private final String[] addresses = PrivCreatePrivacyGroupTest.ADDRESSES;

public String[] getAddresses() {
return addresses;
return ADDRESSES;
}
}
};
Expand All @@ -188,7 +180,7 @@ public String[] getAddresses() {
}

@Test
public void returnsCorrectExceptionInvalidParam() throws Exception {
public void returnsCorrectExceptionInvalidParam() {

final String expected = "a wonderful group";
final PrivacyGroup privacyGroup =
Expand All @@ -202,15 +194,12 @@ public void returnsCorrectExceptionInvalidParam() throws Exception {
final Object[] params =
new Object[] {
new Object() {
private final String name = NAME;
private final String description = DESCRIPTION;

public String getName() {
return name;
return NAME;
}

public String getDescription() {
return description;
return DESCRIPTION;
}
}
};
Expand Down

0 comments on commit 27f1a55

Please sign in to comment.