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

Include argument name for ArgumentExceptions in NmeaLineParser #153

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void ThenTheLineErrorReportShouldIncludeAnExceptionReportingThatTheExpect
Assert.IsInstanceOf<ArgumentException>(call.Error);

var e = (ArgumentException)call.Error;
Assert.AreEqual("Invalid data. Expected '!' at sentence start", e.Message);
Assert.AreEqual("Invalid data. Expected '!' at sentence start (Parameter 'line')", e.Message);
}

[Then("the message error report (.*) should include an exception reporting that the message appears to be incomplete")]
Expand All @@ -134,7 +134,7 @@ public void ThenTheMessageErrorReportShouldIncludeAnExceptionReportingThatTheMes
Assert.IsInstanceOf<ArgumentException>(call.Error);

var e = (ArgumentException)call.Error;
Assert.AreEqual("Invalid data. The message appears to be missing some characters - it may have been corrupted or truncated.", e.Message);
Assert.AreEqual("Invalid data. The message appears to be missing some characters - it may have been corrupted or truncated. (Parameter 'line')", e.Message);
}

[Then("the message error report (.*) should include an exception reporting that the padding is missing")]
Expand All @@ -144,7 +144,7 @@ public void ThenTheMessageErrorReportShouldIncludeAnExceptionReportingThatThePad
Assert.IsInstanceOf<ArgumentException>(call.Error);

var e = (ArgumentException)call.Error;
Assert.AreEqual("Invalid data. Payload padding field not present - the message may have been corrupted or truncated", e.Message);
Assert.AreEqual("Invalid data. Payload padding field not present - the message may have been corrupted or truncated (Parameter 'line')", e.Message);
}

[Then("the message error report (.*) should include an exception reporting that the checksum is missing")]
Expand All @@ -154,7 +154,7 @@ public void ThenTheMessageErrorReportShouldIncludeAnExceptionReportingThatTheChe
Assert.IsInstanceOf<ArgumentException>(call.Error);

var e = (ArgumentException)call.Error;
Assert.AreEqual("Invalid data. Payload checksum not present - the message may have been corrupted or truncated", e.Message);
Assert.AreEqual("Invalid data. Payload checksum not present - the message may have been corrupted or truncated (Parameter 'line')", e.Message);
}

[Then("the message error report (.*) should include an exception reporting that the expected exclamation mark is missing")]
Expand All @@ -164,7 +164,7 @@ public void ThenTheMessageErrorReportShouldIncludeAnExceptionReportingThatTheExp
Assert.IsInstanceOf<ArgumentException>(call.Error);

var e = (ArgumentException)call.Error;
Assert.AreEqual("Invalid data. Expected '!' at sentence start", e.Message);
Assert.AreEqual("Invalid data. Expected '!' at sentence start (Parameter 'line')", e.Message);
}

[Then("the message error report (.*) should include an exception reporting that an unrecognized field is present")]
Expand Down
30 changes: 10 additions & 20 deletions Solutions/Ais.Net.Specs/Ais/Net/Specs/ParsePayloadSpecs.feature.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading