Skip to content

Commit

Permalink
Applied poppy print
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-str committed Jul 12, 2024
1 parent 52b10d7 commit 3ccd3b7
Show file tree
Hide file tree
Showing 300 changed files with 881 additions and 858 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ testing
testToolTipWith: aQuestion

| answerPanel toolTip |

answerPanel := LQSelectionAnswerPanel new.
answerPanel question: aQuestion.
toolTip := answerPanel buildQuestionTooltipWith: ToolBuilder default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
},
"instance" : {
"testToolTip" : "FLST 7/11/2024 19:20",
"testToolTipWith:" : "FLST 7/11/2024 19:21" } }
"testToolTipWith:" : "FLST 7/12/2024 15:55" } }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
helper methods
createAnswerSet1

self answerSet1: (LQAnswerSet new
pollId: (self poll id);
pollId: self poll id;
yourself)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
helper methods
createAnswerSet2

self answerSet2: (LQAnswerSet new
pollId: (self poll id);
pollId: self poll id;
yourself)
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
helper methods
createPoll

| pollId |

self poll: (LQPoll newWithPollDraft: LQPollDraft new).
self poll pollDraft questionList add: (LQMultiChoiceQuestion new
title: 'Where is the master ball';
Expand All @@ -11,7 +10,5 @@ createPoll
self poll userSetID: self userSet id.

pollId := 'gotta-catch-rayquaza'.
(LQRemotePollRepoServer pollRepo includesKey: pollId)
ifTrue: [LQRemotePollRepoServer pollRepo removeKey: pollId].
self poll startWithId: pollId ifTaken: [self fail: 'Poll ID already taken']

(LQRemotePollRepoServer pollRepo includesKey: pollId) ifTrue: [LQRemotePollRepoServer pollRepo removeKey: pollId].
self poll startWithId: pollId ifTaken: [self fail: 'Poll ID already taken']
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
helper methods
createUser1

^ LQUser new firstname: 'erika'; surname: 'musterfrau'; mail: '[email protected]'; group: 'group1';yourself
^ LQUser new
firstname: 'erika';
surname: 'musterfrau';
mail: '[email protected]';
group: 'group1';
yourself
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
helper methods
createUser2

^ LQUser new firstname: 'Lucia'; surname: ''; mail: '[email protected]'; group: '3';yourself
^ LQUser new
firstname: 'Lucia';
surname: '';
mail: '[email protected]';
group: '3';
yourself
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
helper methods
createUserSet1

self user1: self createUser1.
self user2: self createUser2.
self userSet: (LQUserSet new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
helper methods
setQuestion1

self q1: self poll questionList first
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ testGroupBasedAnswerExclusionEnforced

self answerSet1 token: self user1 token.
self answerSet1 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList first) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList first description};
yourself).
self answerSet2 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList second) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList second description};
yourself).
self deny: ((LQAntiCheat new) is: self answerSet1 From: self user1 ValidFor: self poll).
self deny: (LQAntiCheat new is: self answerSet1 From: self user1 ValidFor: self poll).
self poll addAnswerSet: self answerSet1.
self deny: ((LQAntiCheat new) is: self answerSet2 From: self user2 ValidFor: self poll)
self deny: (LQAntiCheat new is: self answerSet2 From: self user2 ValidFor: self poll)
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
testing
testMultipleAnsweringPrevented1

self answerSet1 token: self user1 token.
self assert: ((LQAntiCheat new) is: self answerSet1 From: self user1 ValidFor: self poll).
self assert: (LQAntiCheat new is: self answerSet1 From: self user1 ValidFor: self poll).
self poll addAnswerSet: self answerSet1.
self deny: ((LQAntiCheat new) is: self answerSet1 From: self user1 ValidFor: self poll)

self deny: (LQAntiCheat new is: self answerSet1 From: self user1 ValidFor: self poll)
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
testing
testMultipleAnsweringPrevented2

self answerSet1 token: self user1 token.
self answerSet1 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList second) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList second description};
yourself).
self answerSet2 token: self user1 token.
self answerSet2 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList second) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList second description};
yourself).

self assert: ((LQAntiCheat new) is: self answerSet1 From: self user1 ValidFor: self poll).
self assert: (LQAntiCheat new is: self answerSet1 From: self user1 ValidFor: self poll).
self poll addAnswerSet: self answerSet1.
self deny: ((LQAntiCheat new) is: self answerSet2 From: self user1 ValidFor: self poll)

self deny: (LQAntiCheat new is: self answerSet2 From: self user1 ValidFor: self poll)
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
testing
testNormalAnsweringAllowed

self answerSet1 token: self user1 token.
self answerSet1 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList second) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList second description};
yourself).
self answerSet2 token: self user2 token.
self answerSet2 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList first) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList first description};
yourself).

self assert: ((LQAntiCheat new) is: self answerSet1 From: self user1 ValidFor: self poll).
self assert: (LQAntiCheat new is: self answerSet1 From: self user1 ValidFor: self poll).
self poll addAnswerSet: self answerSet1.
self assert: ((LQAntiCheat new) is: self answerSet2 From: self user2 ValidFor: self poll)

self assert: (LQAntiCheat new is: self answerSet2 From: self user2 ValidFor: self poll)
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@ testPollSanitization

self answerSet1 token: self user1 token.
self answerSet1 addAnswer: (LQChoicesAnswer new
questionId: (self q1 id);
choicesRanking: {(self q1 choiceList second) description};
questionId: self q1 id;
choicesRanking: {self q1 choiceList second description};
yourself).
LQPollRepo default token: self user1 token.
LQPollRepo default addAnswerSet: self answerSet1 ToPoll: self poll id.
self assert: 1 equals: ((LQRemotePollRepoServer pollRepo at: self poll id) answerSets size).
self assert: 0 equals: ((LQPollRepo default at: self poll id ifAbsent: [^self fail]) answerSets size).
self assert: 1 equals: (LQRemotePollRepoServer pollRepo at: self poll id) answerSets size.
self
assert: 0
equals: (LQPollRepo default at: self poll id ifAbsent: [^ self fail]) answerSets size.
LQPollRepo default token: self user2 token.
self assert: 0 equals: ((LQPollRepo default at: self poll id ifAbsent: [^self fail]) answerSets size).
self assert: ((LQPollRepo default at: self poll id ifAbsent: [^self fail]) guard hashedPassword isNil).
self assert: '' equals: ((LQPollRepo default at: self poll id ifAbsent: [^self fail]) pollDraft userSetID)
self
assert: 0
equals: (LQPollRepo default at: self poll id ifAbsent: [^ self fail]) answerSets size.
self assert: (LQPollRepo default at: self poll id ifAbsent: [^ self fail]) guard hashedPassword isNil.
self
assert: ''
equals: (LQPollRepo default at: self poll id ifAbsent: [^ self fail]) pollDraft userSetID
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
"answerSet1:" : "kge 8/4/2022 18:22",
"answerSet2" : "kge 8/4/2022 18:22",
"answerSet2:" : "kge 8/4/2022 18:22",
"createAnswerSet1" : "kge 8/4/2022 18:23",
"createAnswerSet2" : "kge 8/4/2022 18:24",
"createPoll" : "bn 8/2/2022 17:41",
"createUser1" : "kge 8/1/2022 20:37",
"createUser2" : "kge 8/1/2022 20:37",
"createUserSet1" : "bn 8/2/2022 17:41",
"createAnswerSet1" : "FLST 7/12/2024 15:55",
"createAnswerSet2" : "FLST 7/12/2024 15:55",
"createPoll" : "FLST 7/12/2024 15:55",
"createUser1" : "FLST 7/12/2024 15:55",
"createUser2" : "FLST 7/12/2024 15:55",
"createUserSet1" : "FLST 7/12/2024 15:55",
"poll" : "kge 7/21/2022 22:10",
"poll:" : "kge 7/21/2022 22:10",
"q1" : "kge 8/4/2022 18:24",
"q1:" : "kge 8/4/2022 18:24",
"setQuestion1" : "kge 8/4/2022 18:26",
"setQuestion1" : "FLST 7/12/2024 15:55",
"setUp" : "kge 8/4/2022 18:26",
"testGroupBasedAnswerExclusionEnforced" : "Anton Eichstädt 7/8/2024 16:45",
"testMultipleAnsweringPrevented1" : "kge 8/4/2022 18:29",
"testMultipleAnsweringPrevented2" : "Anton Eichstädt 7/8/2024 16:45",
"testNormalAnsweringAllowed" : "Anton Eichstädt 7/8/2024 16:45",
"testPollSanitization" : "Anton Eichstädt 7/8/2024 16:46",
"testGroupBasedAnswerExclusionEnforced" : "FLST 7/12/2024 15:55",
"testMultipleAnsweringPrevented1" : "FLST 7/12/2024 15:55",
"testMultipleAnsweringPrevented2" : "FLST 7/12/2024 15:55",
"testNormalAnsweringAllowed" : "FLST 7/12/2024 15:55",
"testPollSanitization" : "FLST 7/12/2024 15:55",
"testUserAnsweredPollFalse" : "kge 8/1/2022 19:44",
"testUserAnsweredPollTrue" : "kge 8/4/2022 18:35",
"user1" : "kge 7/21/2022 22:13",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
helper methods
createPoll

| pollId |

self poll: (LQPoll newWithPollDraft: LQPollDraft new).
self poll pollDraft questionList add: (LQMultiChoiceQuestion new
title: 'Where is the master ball';
Expand All @@ -11,6 +10,5 @@ createPoll
self poll userSetID: self userSet id.

pollId := 'gotta-catch-rayquaza'.
(LQRemotePollRepoServer pollRepo includesKey: pollId)
ifTrue: [LQRemotePollRepoServer pollRepo removeKey: pollId].
self poll startWithId: pollId ifTaken: [self fail: 'Poll ID already taken']
(LQRemotePollRepoServer pollRepo includesKey: pollId) ifTrue: [LQRemotePollRepoServer pollRepo removeKey: pollId].
self poll startWithId: pollId ifTaken: [self fail: 'Poll ID already taken']
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
helper methods
createPoll2

| pollId |

self poll2: (LQPoll newWithPollDraft: LQPollDraft new).
self poll2 pollDraft questionList add: (LQMultiChoiceQuestion new
title: 'Where is the master ball';
Expand All @@ -11,6 +10,5 @@ createPoll2
self poll2 userSetID: self userSet2 id.

pollId := 'yet-another-poll-id'.
(LQRemotePollRepoServer pollRepo includesKey: pollId)
ifTrue: [LQRemotePollRepoServer pollRepo removeKey: pollId].
self poll2 startWithId: pollId ifTaken: [self fail: 'Poll ID already taken']
(LQRemotePollRepoServer pollRepo includesKey: pollId) ifTrue: [LQRemotePollRepoServer pollRepo removeKey: pollId].
self poll2 startWithId: pollId ifTaken: [self fail: 'Poll ID already taken']
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
helper methods
createUser1

^ LQUser new firstname: 'erika'; surname: 'musterfrau'; mail: '[email protected]'; group: 'group1'; yourself
^ LQUser new
firstname: 'erika';
surname: 'musterfrau';
mail: '[email protected]';
group: 'group1';
yourself
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
helper methods
createUser2

^ LQUser new firstname: 'Lucia'; surname: ''; mail: '[email protected]'; group: '3'; yourself
^ LQUser new
firstname: 'Lucia';
surname: '';
mail: '[email protected]';
group: '3';
yourself
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
helper methods
createUser3

^ LQUser new firstname: 'Ash'; surname: 'Ketchum'; mail: '[email protected]'; group: 'Rocket'; yourself
^ LQUser new
firstname: 'Ash';
surname: 'Ketchum';
mail: '[email protected]';
group: 'Rocket';
yourself
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
helper methods
createUserSet1

self userSet: (LQUserSet new
addUser: self user1;
addUser: self user2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
helper methods
createUserSet2

self userSet2: (LQUserSet new
addUser: self user3;
yourself).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ setUp
createUserSet1;
createUserSet2;
createPoll;
createPoll2

createPoll2
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ testing
testPollRepo200ResponseForUser1

LQPollRepo default token: self user1 token.
self assert: ((LQPollRepo default serverAt: self poll id) isSuccess)
self assert: (LQPollRepo default serverAt: self poll id) isSuccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ testing
testPollRepo200ResponseForUser2

LQPollRepo default token: self user2 token.
self assert: ((LQPollRepo default serverAt: self poll id) isSuccess)
self assert: (LQPollRepo default serverAt: self poll id) isSuccess
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ testing
testPollRepo401ResponseForEmptyToken

LQPollRepo default token: ''.
self assert: LQRemotePollRepoServer unauthorizedResponseCode
equals: ((LQPollRepo default serverAt: self poll id) code)
self
assert: LQRemotePollRepoServer unauthorizedResponseCode
equals: (LQPollRepo default serverAt: self poll id) code
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ testPollRepo401ResponseForInvalidToken
| invalidToken |
invalidToken := -100.
LQPollRepo default token: invalidToken.
self assert: LQRemotePollRepoServer unauthorizedResponseCode equals:
((LQPollRepo default serverAt: self poll id) code)
self
assert: LQRemotePollRepoServer unauthorizedResponseCode
equals: (LQPollRepo default serverAt: self poll id) code
Loading

0 comments on commit 3ccd3b7

Please sign in to comment.