-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
number of issued ballots are recorded #194 #195 #263
number of issued ballots are recorded #194 #195 #263
Conversation
conflicts |
…rded_for_admin_194
Fixed |
@magwas Could you fix the sonarcloud to not whine about public properties of an Entity here too? |
…rded_for_admin_194
Sorry I would not like to be rude. :( |
It is not being rude, Sonar is sometimes whining because does not understand the situation. |
src/test/java/org/rulez/demokracia/pdengine/ObtainBallotTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/rulez/demokracia/pdengine/ObtainBallotTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/rulez/demokracia/pdengine/ObtainBallotTest.java
Outdated
Show resolved
Hide resolved
@@ -16,12 +16,15 @@ public VoteRegistry(WebServiceContext wsContext) { | |||
public String obtainBallot(String id, String adminKey) { | |||
Vote vote = getVote(id); | |||
|
|||
if(adminKey.equals("anon")) { | |||
if(adminKey.equals(vote.adminKey)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the requirement was confusing. You can choose to leave the implementation as is, as this is not your mistake, and you are not obliged to read minds.
For the record I try to reword the intent of the two behaviours:
- adminkey can be either "user" or the adminkey of the vote
- if adminkey is "user", and the user have all the needed assurances, then the ballot is registered for the WS user, and at most one ballot can be issued for that user.
- if the adminkey is the vote's adminkey, then the ballot is registered to "admin"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I will take a look later. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I pushed my changes and I observed that. You use user instead of anon. I mean I changed the anon checks but it is on the beharviors too.
For example:
@tested_feature("Manage votes")
@tested_operation("Obtain ballot")
@tested_behaviour("if adminKey is anon, the user should have all the neededAssurances")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw it was a very good specificaton thanks :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any future plan to explain more detailed the tasks/specification?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course I have to update the architecture model. See #267
testcasenumber=2 |
I hope it covers your expectations.
#194
#195