Skip to content
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

Add canUpdate as invariant #188 #189 #190 #192 #260

Merged
merged 4 commits into from Mar 16, 2019

Conversation

valentinbujdoso
Copy link
Contributor

@valentinbujdoso
Copy link
Contributor Author

@magwas If I dont give a static value or set it somewhere the sonarcloud will fail.
What should I do? As I understand we does not use it anywhere yet.

@magwas
Copy link
Member

magwas commented Mar 16, 2019

I told Sonar not to whine about pubic properties of an Entity.
This is due to the fact that we go with Uncle Bob's suggestion that you should separate data and behaviour, and in this case you can have public properites, no need for getters and setters. However Sonar is an oldschool chap, who does not know this distinction.

}

@tested_feature("Manage votes")
@tested_operation("modify vote")
@tested_behaviour("vote invariants")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are revoking a test here. don't do that.
Just add the new behaviour (I hope the analysis script can cope with that. If not, then it will be fixed.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can not leave two tested_behaviour here :(
So should I create a separate test for it?

Copy link
Member

@magwas magwas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the cleanup

@magwas
Copy link
Member

magwas commented Mar 16, 2019

testcasecount=3

@magwas magwas merged commit dc4f41a into develop Mar 16, 2019
@valentinbujdoso
Copy link
Contributor Author

Are you sure about the 3 testcase? :)

@magwas
Copy link
Member

magwas commented Mar 16, 2019

what is your count?

@valentinbujdoso
Copy link
Contributor Author

src/test/java/org/rulez/demokracia/pdengine/ObtainBallotInvariantsTest.java
src/test/java/org/rulez/demokracia/pdengine/VoteInitialValuesTest.java
src/test/java/org/rulez/demokracia/pdengine/VoteSetParametersTest.java
src/test/java/org/rulez/demokracia/pdengine/VoteModificationInvariantsObservedTest.java
1 tests in every files, but the last one is only 1 row without the good behaviour. (Duplicated behaviour problem)

@magwas
Copy link
Member

magwas commented Mar 16, 2019

Well, I did not count VoteModificationInvariantsObservedTest.java, as it is not a new test, and does not have the behaviour recorded.
You can reopen and fix it, even by just inserting that annotation on the top as well. Sooner or later I will have to check whether more behaviour annotations are handled by zenta-tools anyway...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants