Skip to content

Throw unlaunch attribute cast exception if wrong value is passed in#34

Merged
umermansoor merged 4 commits into
developmentfrom
throw_UnlaunchAttributeClassCastException
Feb 3, 2021
Merged

Throw unlaunch attribute cast exception if wrong value is passed in#34
umermansoor merged 4 commits into
developmentfrom
throw_UnlaunchAttributeClassCastException

Conversation

@tnguyenquy

Copy link
Copy Markdown
Contributor

No description provided.

}

@Test
public void testEqualsWrongNumberFormat(){

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the exception is not thrown, the catch block won't be called and the test will pass.
A better way is to add expected annotation to error. E.g.

@test(expected = NullPointerException.class)
public void whenExceptionThrown_thenExpectationSatisfied() {
String test = null;
test.length();
}

@umermansoor umermansoor self-requested a review February 3, 2021 05:56
@umermansoor umermansoor merged commit 93f189a into development Feb 3, 2021
@tnguyenquy tnguyenquy deleted the throw_UnlaunchAttributeClassCastException branch February 3, 2021 06:00
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