Coder Social home page Coder Social logo

pdengine's People

Contributors

colorimeter avatar emddom avatar fuhur1 avatar lbarjak avatar magwas avatar mortoize avatar szirbucz avatar tarkabab avatar utopszkij avatar valentinbujdoso avatar wigmansp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdengine's Issues

vote invariants are observerd in modify vote

Behaviour: Manage votes/modify vote; vote invariants
@tested_feature("Manage votes")
@tested_operation("modify vote")
@tested_behaviour("vote invariants")

the following vote parameters are invariant:

  • vote id
  • admin key
  • needed assurances
  • counted assurances
  • is private
  • creation time

Deviation in model

set vote parameters do not modify invariants

Behaviour: Manage votes/set vote parameters; vote invariants
@tested_feature("Manage votes")
@tested_operation("set vote parameters")
@tested_behaviour("vote invariants")

the following vote parameters are invariant:

  • vote id
  • admin key
  • needed assurances
  • counted assurances
  • is private
  • creation time

Deviation in model

ballot code

I, as a voter want to have means to make sure that my vote is indeed correctly accounted for.

set vote parameters validates inputs

Behaviour: Manage votes/set vote parameters; validates inputs
@tested_feature("Manage votes")
@tested_operation("set vote parameters")
@tested_behaviour("validates inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey
String newstage: one of "created",

Deviation in model

create vote returns a vote id

Behaviour: Manage votes/create vote; returns an unique vote id for reference and administrator key for vote management
@tested_feature("Manage votes")
@tested_operation("create vote")
@tested_behaviour("returns an unique vote id for reference and administrator key for vote management")

Deviation in model

http://adadocs.demokracia.rulez.org/PDEngine/edemo/master/index.html#9386718b-3caf-4152-8386-0df9deeb35d3-53971969-fee5-4442-a283-98d7f5b2c94f-4254c731-94cd-4f02-9e1b-362d5d46496a)

the vote initially only modifiable by the admin key

Behaviour: Manage votes/create vote; The vote initially can only be modified with the adminkey
@tested_feature("Manage votes")
@tested_operation("create vote")
@tested_behaviour("The vote initially can only be modified with the adminkey")

The fields describing what can be done with the vote are the following:
canAddIn: False ;users can add in without the adminKey
canEndorse: False ;users can endorse choices
canVote: False; users can vote
canView: False; users can view the vote result

add choice validates input

Behaviour: Manage votes/Add choice; validates inputs
@tested_feature("Manage votes")
@tested_operation("Add choice")
@tested_behaviour("validates inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey, or "user"
String choiceId: id of existing choice in the vote with voteid

Deviation in model

modify choice "user" case

Behaviour: Manage votes/modify choice; if "user" is used as adminKey, then the user must be the one who added the choice and canAddIn be true
@tested_feature("Manage votes")
@tested_operation("modify choice")
@tested_behaviour("if "user" is used as adminKey, then the user must be the one who added the choice and canAddIn be true")

Deviation in model

modify vote validates input

Behaviour: Manage votes/modify vote; validates inputs
@tested_feature("Manage votes")
@tested_operation("modify vote")
@tested_behaviour("validates inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey
String votename: for length and characters contained

Deviation in model

test coverage

measure coverage change since previous commit as well

show vote returns the vote in json

Behaviour: Manage votes/show vote; returns the vote in json
@tested_feature("Manage votes")
@tested_operation("show vote")
@tested_behaviour("returns the vote in json")

containing

  • the vote id and name,
  • id, name and endorsement count for all choices,
  • the needed assurances
  • the counted assurances
  • whether the vote is private
  • all vote parameters
  • creation date
  • number of votes cast
  • if canView, the vote results

does not contain adminKey

Deviation in model

create a vote creates a vote

Behaviour: Manage votes/create vote; Creates a vote
@tested_feature("Manage votes")
@tested_operation("create vote")
@tested_behaviour("Creates a vote")

A new vote appears in the database, with needed- and countedAssurances, isClosed, vote id, creation time (unix time), minEndorsements and admin key.

for show vote the user needs a counted assurance

Behaviour: Manage votes/show vote; if adminKey is anon, the user should have any of the countedAssurances
@tested_feature("Manage votes")
@tested_operation("show vote")
@tested_behaviour("if adminKey is anon, the user should have any of the countedAssurances")

Deviation in model

create vote formally validates all inputs

Behaviour: Manage votes/create vote; formally validates all inputs
@tested_feature("Manage votes")
@tested_operation("create vote")
@tested_behaviour("formally validates all inputs")

String votename: for length and characters contained
List<String> neededAssurances: for length and characters contained. no empty string. can be empty. no two strings are the same
List<String> countedAssurances: for length and characters contained. can be empty string. no two strings are the same. nonempty
bool private: true or false

Deviation in model

design artifact repo layout

such that

  • developers can easily look up failures
  • all the documentation can be reached with a browser when starting from an index.html

vote invariants

Behaviour: Manage votes/create vote; vote invariants
@tested_feature("Manage votes")
@tested_operation("create vote")
@tested_behaviour("vote invariants")

the following vote parameters are invariant:

  • vote id
  • admin key
  • needed assurances
  • counted assurances
  • is private
  • creation time

Deviation in model

Requirement: no delete

Kedden beszéljük át.
Vida Zoltán
Vida Zoltán Árpi, lehet, hogy én rosszul nézem, vagy túlzott követelményeim vannak, de szerintem volt is róla szó, hogy a Vote-okat nem törölnénk a delete során, csak inaktiválnánk őket. Különben utána nem lesz mit kiértékelni.
Tetszik · Válasz · 12 perce
Árpád Magosányi
Árpád Magosányi Beszéljük meg, úgy is lehet. De az miért nem elég, ha az ember utolsó érvényesen leadott szavazata szerepel az adatbázisban?
Tetszik · Válasz · 10 perce
Árpád Magosányi
Árpád Magosányi Vagy erre gondolsz: http://adadocs.demokracia.rulez.org/PDEn.../edemo/master/... ?
Jogos, hogy a már elkezdett szavazást ne lehessen törölni.
Tetszik · Válasz · 8 perce
Vida Zoltán
Vida Zoltán Ha valami kavarás van, akkor legalább megtudjható, mikor és milyen választókat érintett. Pl. ha Hupikék párt elrendeli,hogy az ő támogatói lépjenek vissza, akkor ezt ki lehet mutatni, mennyire mentek utánuk a szavazóik.
Tetszik · Válasz · 3 perce

delete choice validates input

Behaviour: Manage votes/delete choice; validates inputs
@tested_feature("Manage votes")
@tested_operation("delete choice")
@tested_behaviour("validates inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey, or "user"
String choiceId: id of existing choice in the vote with voteid

Deviation in model

delete vote validates input

Behaviour: Manage votes/delete vote; validate inputs
@tested_feature("Manage votes")
@tested_operation("delete vote")
@tested_behaviour("validate inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey

Deviation in model

deliver for shippable

after build the "tests" és "coverage" report of shippable should show the relevant data

show vote validates inputs

Behaviour: Manage votes/show vote; validates inputs
@tested_feature("Manage votes")
@tested_operation("show vote")
@tested_behaviour("validates inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey for private votes, "anon" for public ones

Deviation in model

delete choice, "user" case

Behaviour: Manage votes/delete choice; if "user" is used as adminKey, then the user must be the one who added the choice and canAddIn be true
@tested_feature("Manage votes")
@tested_operation("delete choice")
@tested_behaviour("if "user" is used as adminKey, then the user must be the one who added the choice and canAddIn be true")

Deviation in model

behaviour documentation

an xml and html generated from that
the behaviours are documented with all the testcase names testing that behaviour converted to english sentences

obtain ballots observes invariants

Behaviour: Manage votes/Obtain ballot; vote invariants
@tested_feature("Manage votes")
@tested_operation("Obtain ballot")
@tested_behaviour("vote invariants")

the following vote parameters are invariant:

  • vote id
  • admin key
  • needed assurances
  • counted assurances
  • is private
  • creation time

Deviation in model

modify vote updates vote title

Behaviour: Manage votes/modify vote; updates vote title
@tested_feature("Manage votes")
@tested_operation("modify vote")
@tested_behaviour("updates vote title")

No other vote parameters are changed

Deviation in model

modify choice validates inputs

Behaviour: Manage votes/modify choice; validates inputs
@tested_feature("Manage votes")
@tested_operation("modify choice")
@tested_behaviour("validates inputs")

String voteId: id of existing vote
String adminKey: same as vote's adminKey, or "user"
String choiceId: id of existing choice in the vote with voteid

Deviation in model

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.