Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests for peripheral #442

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

pawelByszewski
Copy link
Collaborator

No description provided.

lib/src/util/_transaction_id_generator.dart Outdated Show resolved Hide resolved
lib/characteristic.dart Outdated Show resolved Hide resolved
lib/descriptor.dart Outdated Show resolved Hide resolved
lib/peripheral.dart Outdated Show resolved Hide resolved
lib/service.dart Outdated Show resolved Hide resolved
test/peripheral_test.dart Outdated Show resolved Hide resolved
test/peripheral_test.dart Outdated Show resolved Hide resolved
test/peripheral_test.dart Outdated Show resolved Hide resolved
test/peripheral_test.dart Outdated Show resolved Hide resolved
test/src/util/transcation_id_generator_test.dart Outdated Show resolved Hide resolved
Flutter User Facing API.dart Show resolved Hide resolved
Descriptor.fromJson(Map<String, dynamic> jsonObject,
Characteristic characteristic, ManagerForDescriptor manager,
{TransactionIdGenerator transactionIdGenerator =
TransactionIdGenerator.INSTANCE})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TransactionIdGenerator.INSTANCE})
TransactionIdGenerator.INSTANCE,})

and run formatter

Peripheral.fromJson(Map<String, dynamic> json, ManagerForPeripheral manager)
Peripheral.fromJson(Map<String, dynamic> json, ManagerForPeripheral manager,
{TransactionIdGenerator transactionIdGenerator =
TransactionIdGenerator.INSTANCE})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TransactionIdGenerator.INSTANCE})
TransactionIdGenerator.INSTANCE,})

and run formatter

Service.fromJson(Map<String, dynamic> jsonObject, Peripheral peripheral,
ManagerForService managerForService,
{TransactionIdGenerator transactionIdGenerator =
TransactionIdGenerator.INSTANCE})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TransactionIdGenerator.INSTANCE})
TransactionIdGenerator.INSTANCE,})

and run formatter


InternalBleManager() {
InternalBleManager({TransactionIdGenerator transactionIdGenerator = TransactionIdGenerator.INSTANCE}) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InternalBleManager({TransactionIdGenerator transactionIdGenerator = TransactionIdGenerator.INSTANCE}) {
InternalBleManager({TransactionIdGenerator transactionIdGenerator = TransactionIdGenerator.INSTANCE,}) {

and run formatter

static int _id = 0;
static const TransactionIdGenerator INSTANCE = const TransactionIdGenerator._internal();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run formatter

TransactionIdGenerator transactionIdGenerator;

setUp((){
transactionIdGenerator = TransactionIdGenerator.INSTANCE;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be the same instance in both tests.

@mikolak mikolak changed the title Feature/unit tests Unit tests for peripheral Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants