Skip to content

Commit 53868c6

Browse files
committed
Better names
1 parent e973290 commit 53868c6

3 files changed

Lines changed: 31 additions & 29 deletions

File tree

src/ExecutableRequirements-Toplo-Example/ExReqToploLoginRequirements.class.st

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -948,9 +948,9 @@ ExReqToploLoginRequirements >> capella_requirement_1 [
948948
<ExReqToploExample>
949949
^ ExReqRequirement new
950950
title:
951-
'Person send "preliminary informations" to Authentification app';
951+
'Person send "preliminary informations" to Authentication app';
952952
description:
953-
'The component named "Person"[a74ca346-8ba1-430e-8ca9-06c48d702ac5] in the function "Proof of identity"[6e26d3cf-5684-4117-ac88-17f5fb63eb0e] transmit "preliminary informations"[ae5df6ac-07ff-4177-8a1d-7f73b386dea8] to the component named "Input Identity UI"[300a7f2b-c0d2-48cd-854b-d9a8fcbadc24] in the function "Authentification app"[d68548ae-78af-44d6-85de-b5e5229541b5]';
953+
'The component named "Person"[a74ca346-8ba1-430e-8ca9-06c48d702ac5] in the function "Proof of identity"[6e26d3cf-5684-4117-ac88-17f5fb63eb0e] transmit "preliminary informations"[ae5df6ac-07ff-4177-8a1d-7f73b386dea8] to the component named "Input Identity UI"[300a7f2b-c0d2-48cd-854b-d9a8fcbadc24] in the function "Authentication app"[d68548ae-78af-44d6-85de-b5e5229541b5]';
954954
sourceDocument: (ExReqCapellaDocument new
955955
id: 'ae5df6ac-07ff-4177-8a1d-7f73b386dea8';
956956
name: 'login_system';
@@ -996,14 +996,23 @@ ExReqToploLoginRequirements >> capella_requirement_3 [
996996
id: '141c2297-10ac-4e90-82c4-83fc9c7b3b14';
997997
name: 'login_system';
998998
yourself);
999-
addVerification: [ :verif |
999+
addVerification: [ :verif |
10001000
verif
1001-
addStepOnAST: (ExReqToploLoginWidget >> #loginAction) ast withPrecondition: [ :obj | obj loginStatusContainer isVisible not ].
1002-
verif addStepOnAST: (ExReqToploLoginSimulation >> #authentificateUsername:password:) ast withPrecondition: [ :obj :args |
1003-
(obj perform: #authentificateUsername:password: withArguments: args) not. ].
1004-
verif addStepOnAST: (ExReqToploLoginWidget >> #loginAction) ast withPostcondition: [ :obj :args |
1005-
(obj loginStatusContainer isVisible). ]
1006-
];
1001+
addStepOnAST: (ExReqToploLoginWidget >> #loginAction) ast
1002+
withPrecondition: [ :obj |
1003+
obj loginStatusContainer isVisible not ].
1004+
verif
1005+
addStepOnAST:
1006+
(ExReqToploLoginSimulation >> #authenticateUsername:password:)
1007+
ast
1008+
withPrecondition: [ :obj :args |
1009+
(obj
1010+
perform: #authenticateUsername:password:
1011+
withArguments: args) not ].
1012+
verif
1013+
addStepOnAST: (ExReqToploLoginWidget >> #loginAction) ast
1014+
withPostcondition: [ :obj :args |
1015+
obj loginStatusContainer isVisible ] ];
10071016
yourself
10081017
]
10091018

src/ExecutableRequirements-Toplo-Example/ExReqToploLoginSimulation.class.st

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Class {
99
}
1010

1111
{ #category : 'as yet unclassified' }
12-
ExReqToploLoginSimulation class >> authentificationPage [
12+
ExReqToploLoginSimulation class >> authenticationPage [
1313

1414
| widget background space |
1515
widget := self defaultWidget.
@@ -37,8 +37,8 @@ ExReqToploLoginSimulation class >> defaultWidget [
3737
| widget database |
3838
database := self new.
3939
widget := ExReqToploLoginWidget new.
40-
widget authentificationBlock: [ :user :pass |
41-
database authentificateUsername: user password: pass ].
40+
widget authenticationBlock: [ :user :pass |
41+
database authenticateUsername: user password: pass ].
4242
widget loginBlock: [ self inform: 'Login success !' ].
4343
^ widget
4444
]
@@ -47,19 +47,12 @@ ExReqToploLoginSimulation class >> defaultWidget [
4747
ExReqToploLoginSimulation class >> open [
4848

4949
<script>
50-
| space |
51-
space := self authentificationPage show.
52-
space show.
53-
space
54-
addEventHandlerOn: BlSpaceShownEvent
55-
do: [ :evt |
56-
evt source pulse.
57-
evt source root background: (Color fromHexString: 'a1b8cc') ].
58-
^ space
50+
^ self authenticationPage show.
51+
5952
]
6053

6154
{ #category : 'as yet unclassified' }
62-
ExReqToploLoginSimulation >> authentificateUsername: aUsernameString password: aPasswordString [
55+
ExReqToploLoginSimulation >> authenticateUsername: aUsernameString password: aPasswordString [
6356

6457
self database
6558
at: aUsernameString

src/ExecutableRequirements-Toplo-Example/ExReqToploLoginWidget.class.st

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Class {
33
#superclass : 'ToElement',
44
#instVars : [
55
'loginBlock',
6-
'authentificationBlock'
6+
'authenticationBlock'
77
],
88
#category : 'ExecutableRequirements-Toplo-Example',
99
#package : 'ExecutableRequirements-Toplo-Example'
@@ -337,15 +337,15 @@ tobutton3 := ToButton new.
337337
]
338338

339339
{ #category : 'as yet unclassified' }
340-
ExReqToploLoginWidget >> authentificationBlock [
340+
ExReqToploLoginWidget >> authenticationBlock [
341341

342-
^ authentificationBlock
342+
^ authenticationBlock
343343
]
344344

345345
{ #category : 'as yet unclassified' }
346-
ExReqToploLoginWidget >> authentificationBlock: aBlock [
346+
ExReqToploLoginWidget >> authenticationBlock: aBlock [
347347

348-
authentificationBlock := aBlock
348+
authenticationBlock := aBlock
349349
]
350350

351351
{ #category : 'initialization' }
@@ -358,7 +358,7 @@ ExReqToploLoginWidget >> initialize [
358358
c vertical fitContent ].
359359
self usernameInput withoutLineBreak.
360360
self passwordInput withoutLineBreak.
361-
authentificationBlock := [ :username :password | false ].
361+
authenticationBlock := [ :username :password | false ].
362362
loginBlock := [ ].
363363
self loginButton whenClickedDo: [ self loginAction ].
364364
self loginStatusContainer visibility: BlVisibility gone
@@ -367,7 +367,7 @@ ExReqToploLoginWidget >> initialize [
367367
{ #category : 'as yet unclassified' }
368368
ExReqToploLoginWidget >> loginAction [
369369

370-
(self authentificationBlock
370+
(self authenticationBlock
371371
value: self usernameValue
372372
value: self passwordValue)
373373
ifTrue: [ self loginBlock value ]

0 commit comments

Comments
 (0)