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

Commit

Permalink
Test the mixin as well
Browse files Browse the repository at this point in the history
  • Loading branch information
collinjackson committed Jan 10, 2022
1 parent 5899fe5 commit 3fe9fbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/plugin_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Adds additional tests for `PlatformInterface` and `MockPlatformInterfaceMixin`.

## 2.1.2

* Updates README to demonstrate `verify` rather than `verifyToken`, and to note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ class ImplementsConstVerifyTokenPluginPlatform extends PlatformInterface
ImplementsConstVerifyTokenPluginPlatform() : super(token: const Object());
}

// Ensures that `PlatformInterface` has no instance methods. Adding an
// instance method is discouraged and may be a breaking change if it
// conflicts with instance methods in subclasses.
class StaticMethodsOnlyPlatformInterfaceTest implements PlatformInterface {}

class StaticMethodsOnlyMockPlatformInterfaceMixinTest
implements MockPlatformInterfaceMixin {}

void main() {
group('`verify`', () {
test('prevents implementation with `implements`', () {
Expand Down

0 comments on commit 3fe9fbb

Please sign in to comment.