Skip to content

Unit tests for peripheral - #442

Open
pawelByszewski wants to merge 7 commits into
developfrom
feature/unit_tests
Open

Unit tests for peripheral#442
pawelByszewski wants to merge 7 commits into
developfrom
feature/unit_tests

Conversation

@pawelByszewski

Copy link
Copy Markdown
Collaborator

No description provided.

Comment threadlib/src/util/_transaction_id_generator.dart Outdated
Comment threadlib/characteristic.dart Outdated
Comment threadlib/descriptor.dart Outdated
Comment threadlib/peripheral.dart Outdated
Comment threadlib/service.dart Outdated
Comment threadtest/peripheral_test.dart Outdated
Comment threadtest/peripheral_test.dart Outdated
Comment threadtest/peripheral_test.dart Outdated
Comment threadtest/peripheral_test.dart Outdated
Comment threadtest/src/util/transcation_id_generator_test.dart Outdated
Comment threadFlutter User Facing API.dart
Comment threadlib/descriptor.dart
Descriptor.fromJson(Map<String, dynamic> jsonObject,
Characteristic characteristic, ManagerForDescriptor manager,
{TransactionIdGenerator transactionIdGenerator =
TransactionIdGenerator.INSTANCE})

Copy link
Copy Markdown
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

Comment threadlib/peripheral.dart
Peripheral.fromJson(Map<String, dynamic> json, ManagerForPeripheral manager)
Peripheral.fromJson(Map<String, dynamic> json, ManagerForPeripheral manager,
{TransactionIdGenerator transactionIdGenerator =
TransactionIdGenerator.INSTANCE})

Copy link
Copy Markdown
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

Comment threadlib/service.dart
Service.fromJson(Map<String, dynamic> jsonObject, Peripheral peripheral,
ManagerForService managerForService,
{TransactionIdGenerator transactionIdGenerator =
TransactionIdGenerator.INSTANCE})

Copy link
Copy Markdown
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

TransactionIdGenerator _transactionIdGenerator;

InternalBleManager() {
InternalBleManager({TransactionIdGenerator transactionIdGenerator = TransactionIdGenerator.INSTANCE}) {

Copy link
Copy Markdown
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

abstract class TransactionIdGenerator {
class TransactionIdGenerator {
static int _id = 0;
static const TransactionIdGenerator INSTANCE = const TransactionIdGenerator._internal();

Copy link
Copy Markdown
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
Copy Markdown
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.

@mikolakmikolak changed the title Feature/unit testsUnit tests for peripheralApr 4, 2020
Sign up for freeto 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

@pawelByszewski@mikolak