File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ NAMESPACE Simatic.Ax.Example
4
4
{TestFixture }
5
5
CLASS TestActiveWait
6
6
VAR
7
- _state : OnDelayMockState ;
7
+ _payloadinstance : OnDelayMockState ;
8
8
testInstance : Testee ;
9
9
END_VAR
10
10
@@ -16,13 +16,13 @@ NAMESPACE Simatic.Ax.Example
16
16
testInstance.ValueT2 := T #2s;
17
17
18
18
// Mock timer values after 5 seconds: Timer1 returns true , Timer2 returns false
19
- _state .StatusTimer1 := TRUE ;
20
- _state .StatusTimer2 := FALSE ;
19
+ _payloadinstance .StatusTimer1 := TRUE ;
20
+ _payloadinstance .StatusTimer2 := FALSE ;
21
21
22
22
// Mock - Setup
23
- AxUnit .Mocking .Mock (' System.Timer. OnDelay' , NAME_OF (OnDelayMock2Timer ), THIS ._state );
23
+ AxUnit .Mocking .Mock (NAME_OF ( OnDelay ) , NAME_OF (OnDelayMock2Timer ), THIS ._payloadinstance );
24
24
testInstance.Execute (run := TRUE );
25
- AxUnit .Assert .Equal (FALSE , testInstance.GetTimerState (1 )); // expected true -- > but something went wrong
25
+ AxUnit .Assert .Equal (TRUE , testInstance.GetTimerState (1 )); // expected true -- > but something went wrong
26
26
AxUnit .Assert .Equal (FALSE , testInstance.GetTimerState (2 ));
27
27
28
28
END_METHOD
You can’t perform that action at this time.
0 commit comments