-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enum + event constructors added for doctor events (#178)
* Enum + event constructors added for doctor events * Use flexible field for doctor results * Clean up dartdoc * Consolidate doctor events into one event instead of 2 * `timestamp` --> `doctorInvocationId` * Test for `Event.doctorValidatorResult` constructor * Additional checks on `eventData` fields * Bump version to prep for publish * Bump version * Prepare for publishing
- Loading branch information
1 parent
e3dd149
commit da6bb18
Showing
6 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import 'package:unified_analytics/src/enums.dart'; | ||
import 'package:unified_analytics/unified_analytics.dart'; | ||
|
||
void main() { | ||
test('Event.doctorValidatorResult constructed', () { | ||
Event genDoctorValidatorResult() => Event.doctorValidatorResult( | ||
validatorName: 'validatorName', | ||
result: 'success', | ||
partOfGroupedValidator: false, | ||
doctorInvocationId: 123, | ||
statusInfo: 'statusInfo', | ||
); | ||
|
||
final constructedEvent = genDoctorValidatorResult(); | ||
|
||
expect(genDoctorValidatorResult, returnsNormally); | ||
expect(constructedEvent.eventName, DashEvent.doctorValidatorResult); | ||
expect(constructedEvent.eventData['validatorName'], 'validatorName'); | ||
expect(constructedEvent.eventData['result'], 'success'); | ||
expect(constructedEvent.eventData['partOfGroupedValidator'], false); | ||
expect(constructedEvent.eventData['doctorInvocationId'], 123); | ||
expect(constructedEvent.eventData['statusInfo'], 'statusInfo'); | ||
}); | ||
} |