Skip to content

isbn-verifier: add new test case #196

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

Merged
merged 1 commit into from
Dec 31, 2017
Merged
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
12 changes: 12 additions & 0 deletions exercises/isbn-verifier/uTestISBNVerifier.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ interface
uses
DUnitX.TestFramework;

const
CanonicalVersion = '2.2.0';

type
[TestFixture]
ISBNVerifierTest = class(TObject)
Expand Down Expand Up @@ -59,6 +62,10 @@ ISBNVerifierTest = class(TObject)
[Test]
[Ignore]
procedure check_digit_of_X_should_not_be_used_for_0;

[Test]
[Ignore]
procedure empty_ISBN;
end;

implementation
Expand All @@ -76,6 +83,11 @@ procedure ISBNVerifierTest.check_digit_of_X_should_not_be_used_for_0;
Assert.IsFalse(TIsbn.isValid('3-598-21515-X'));
end;

procedure ISBNVerifierTest.empty_ISBN;
begin
Assert.IsFalse(TIsbn.isValid(''))
end;

procedure ISBNVerifierTest.invalid_character_in_isbn;
begin
Assert.IsFalse(TIsbn.isValid('3-598-2K507-0'))
Expand Down