Skip to content

Commit

Permalink
fix: Add dart documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaram-kalluri committed Mar 18, 2024
1 parent 8f44aee commit a9389c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/at_commons/lib/src/verb/enroll_verb_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ class EnrollVerbBuilder extends AbstractVerbBuilder {
String? encryptedDefaultSelfEncryptionKey;
String? encryptedAPKAMSymmetricKey;

List<EnrollmentStatus>? enrollmentStatusFilter = EnrollmentStatus.values;
/// Filters enrollment requests according to the provided [EnrollmentStatus] criteria.
///
/// Accepts a list of enrollment statuses, defaulting to all available status values.
List<EnrollmentStatus> enrollmentStatusFilter = EnrollmentStatus.values;

@override
String buildCommand() {
Expand Down
4 changes: 2 additions & 2 deletions packages/at_commons/test/enroll_params_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ void main() {

test('A test to verify enroll list regex with params', () {
String command =
'enroll:list:{"approvalStatusFilter":"[pending, approved]"}';
'enroll:list:{"enrollmentStatusFilter":"[pending, approved]"}';
expect(RegExp(VerbSyntax.enroll).hasMatch(command), true);

command = command.replaceAll('enroll:list:', '');
var enrollParams = jsonDecode(command);
expect(enrollParams['approvalStatusFilter'], '[pending, approved]');
expect(enrollParams['enrollmentStatusFilter'], '[pending, approved]');
});

test('A test to verify enroll list regex without params', () {
Expand Down

0 comments on commit a9389c2

Please sign in to comment.