This repository was archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
[PAN-3071] use object parameter instead of list of parameters for priv_createPrivacyGroup #1868
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f9ea43f
use CreatePrivacyGroupParameter instead of passing array of parameters
iikirilov 2c20192
Apply suggestions from code review
iikirilov c37b9c6
use arbitrary strings in unit test
iikirilov 10331ea
rename variable from eea to priv
iikirilov 3b74692
check type of param in mock + spotless
iikirilov 939bd56
add more tests
iikirilov cf319c2
post-rebase refactor
iikirilov 574eaa0
post-rebase fix mock throw exception
iikirilov 5180e0e
remove fields from anonymous classes
iikirilov 20481e7
wait for group to be created before getting it
iikirilov 073231c
add error logging to jsonrpc handler
iikirilov dcdd514
rename brokenEnclave to failingEnclave
iikirilov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
.../acceptance/dsl/transaction/priv/PrivCreatePrivacyGroupTransactionWithoutDescription.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.priv; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.NodeRequests; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public class PrivCreatePrivacyGroupTransactionWithoutDescription implements Transaction<String> { | ||
private final List<String> addresses; | ||
private final String name; | ||
|
||
public PrivCreatePrivacyGroupTransactionWithoutDescription( | ||
final List<String> addresses, final String name) { | ||
this.addresses = addresses; | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public String execute(final NodeRequests node) { | ||
try { | ||
final PrivRequestFactory.PrivCreatePrivacyGroupResponse result = | ||
node.priv().privCreatePrivacyGroupWithoutDescription(addresses, name).send(); | ||
assertThat(result).isNotNull(); | ||
return result.getResult(); | ||
} catch (final IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...n/tests/acceptance/dsl/transaction/priv/PrivCreatePrivacyGroupTransactionWithoutName.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.priv; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.NodeRequests; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.Transaction; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public class PrivCreatePrivacyGroupTransactionWithoutName implements Transaction<String> { | ||
private final List<String> addresses; | ||
private final String description; | ||
|
||
public PrivCreatePrivacyGroupTransactionWithoutName( | ||
final List<String> addresses, final String description) { | ||
this.addresses = addresses; | ||
this.description = description; | ||
} | ||
|
||
@Override | ||
public String execute(final NodeRequests node) { | ||
try { | ||
final PrivRequestFactory.PrivCreatePrivacyGroupResponse result = | ||
node.priv().privCreatePrivacyGroupWithoutName(addresses, description).send(); | ||
assertThat(result).isNotNull(); | ||
return result.getResult(); | ||
} catch (final IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.