Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

barrel file + configuration template #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions lib/src/annotation.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Created on November 29th 2023
*
* Copyright (C) 2023 Welltested AI - All Rights Reserved
* The code in this file is Intellectutal Property of Welltested AI.
* and can't be edited, redistributed or used without a valid license of it's product (Welltested)[https://welltested.ai]
*/

///Annotate classes with [Welltested] to generate unit tests for it's methods.
///
///Param: [excludedMethods] accepts functions to be excluded from testing.
class Welltested {
final List<String> excludedMethods;

const Welltested({
this.excludedMethods = const [],
});
}

class Testcases {
final List<String> testcases;
const Testcases(
this.testcases,
);
}
26 changes: 26 additions & 0 deletions lib/src/configuration.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Created on November 29th 2023
*
* Copyright (C) 2023 Welltested AI - All Rights Reserved
* The code in this file is Intellectutal Property of Welltested AI.
* and can't be edited, redistributed or used without a valid license of it's product (Welltested)[https://welltested.ai]
*/

/// Welltested configuration class used for costumising the way the tests can be
/// generated using welltested. Currently supported costumizations:
/// - `generateMockFiles`: enable or disable the mock file generation automatically
/// after the tests has been generated
/// - `prefferedMockingLibrary`: ability to provide preffered 3rd party mocking
/// library that can be used to generate mocks. Currently supported options: none,
/// [mocktail](https://pub.dev/packages/mocktail), [mockito](https://pub.dev/packages/mockito)
abstract class WelltestedConfigurationFactory {

bool _defaultGeneratedMockFiles = false;

/// Parameter defines if Welltested should generated the mock files for the mock
/// annotated class(if any). If set to `true`, welltested will generate mock files
/// else mock files won't be generated by welltested automatically and user can
/// generate them using `dart build runner` command. Default is `false`.
bool get generateMockFiles => _defaultGeneratedMockFiles;

}
19 changes: 2 additions & 17 deletions lib/welltested_annotation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,5 @@
* and can't be edited, redistributed or used without a valid license of it's product (Welltested)[https://welltested.ai]
*/

///Annotate classes with [Welltested] to generate unit tests for it's methods.
///
///Param: [excludedMethods] accepts functions to be excluded from testing.
class Welltested {
final List<String> excludedMethods;

const Welltested({
this.excludedMethods = const [],
});
}

class Testcases {
final List<String> testcases;
const Testcases(
this.testcases,
);
}
export 'src/annotation.dart';
export 'src/configuration.dart';