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

Add update firmware #50

Closed
wants to merge 2 commits into from

Conversation

sumlin
Copy link
Contributor

@sumlin sumlin commented Apr 17, 2018

No description provided.

Add some tests for DiagnosticsStatusNotification and FirmwareStatusNotification.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 53.394% when pulling e9cc97e on sumlin:feature/AddUpdateFirmware into 4821388 on ChargeTimeEU:master.

@TVolden
Copy link
Member

TVolden commented Apr 17, 2018

Houston we have merge conflicts :( @sumlin can you take look?


MIT License

Copyright (C) 2016-2018 Thomas Volden <tv@chargetime.eu>
Copy link
Member

Choose a reason for hiding this comment

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

Should be your name and e-mail. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, added mine too

// When
Feature[] features = profile.getFeatureList();

// Then
assertThat(findFeature(features, "GetDiagnostics"), is(instanceOf(GetDiagnosticsFeature.class)));
assertThat(findFeature(features, "GetDiagnostics"), Is.is(instanceOf(GetDiagnosticsFeature.class)));
Copy link
Member

Choose a reason for hiding this comment

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

Principle, only one assert per unit test. Why?
It makes the naming the unit test allot easier for starters... And since an assert is a throwable, you don't know it's only the first failing assert or all the asserts that fail.
http://osherove.com/blog/2005/4/14/try-to-avoid-multiple-asserts-in-a-single-unit-test.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, I'll fix that.

@TVolden
Copy link
Member

TVolden commented Apr 22, 2018

Implemented with #56

@TVolden TVolden closed this Apr 22, 2018
@sumlin sumlin deleted the feature/AddUpdateFirmware branch April 22, 2018 17:42
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.

3 participants