Skip to content

Commit 4e5cfdf

Browse files
committed
feat: update tests for multi instance
1 parent 78cb52d commit 4e5cfdf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/src/enums/threat_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ void main() {
55
test('Threat enum should contain 14 values', () {
66
final threatValuesLength = Threat.values.length;
77

8-
expect(threatValuesLength, 16);
8+
expect(threatValuesLength, 17);
99
});
1010

1111
test('Threat enum should match its values index', () {
@@ -27,6 +27,7 @@ void main() {
2727
expect(threatValues[13], Threat.adbEnabled);
2828
expect(threatValues[14], Threat.screenshot);
2929
expect(threatValues[15], Threat.screenRecording);
30+
expect(threatValues[16], Threat.multiInstance);
3031
});
3132

3233
test(
@@ -49,6 +50,7 @@ void main() {
4950
expect(ThreatX.fromInt(379769839), Threat.adbEnabled);
5051
expect(ThreatX.fromInt(705651459), Threat.screenshot);
5152
expect(ThreatX.fromInt(64690214), Threat.screenRecording);
53+
expect(ThreatX.fromInt(859307284), Threat.multiInstance);
5254
},
5355
);
5456
}

test/test_utils/spy_threat_callback.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class SpyThreatListener {
2424
onScreenshot: () => _log(Threat.screenshot),
2525
onScreenRecording: () => _log(Threat.screenRecording),
2626
onObfuscationIssues: () => _log(Threat.obfuscationIssues),
27+
onMultiInstance: () => _log(Threat.multiInstance),
2728
);
2829

2930
static void _log(Threat threat) {
@@ -64,6 +65,8 @@ class SpyThreatListener {
6465
callback.onScreenshot?.call();
6566
case Threat.screenRecording:
6667
callback.onScreenRecording?.call();
68+
case Threat.multiInstance:
69+
callback.onMultiInstance?.call();
6770
}
6871
}
6972
}

0 commit comments

Comments
 (0)