Skip to content

Commit

Permalink
Added unit tests for verifying special item is a warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaz committed Sep 2, 2010
1 parent cdbe576 commit 5ac13ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Testing/GBCommentsProcessor-WarningsTesting.m
Expand Up @@ -27,6 +27,7 @@ - (void)testProcessCommentWithStore_warnings_shouldAttachWarningToPreviousParagr
GBCommentParagraph *paragraph = comment.firstParagraph;
[self assertParagraph:paragraph containsItems:[GBParagraphTextItem class], @"Paragraph", [GBParagraphSpecialItem class], [NSNull null], nil];
GBParagraphSpecialItem *item = [paragraph.items objectAtIndex:1];
assertThatInteger(item.specialItemType, equalToInteger(GBSpecialItemTypeWarning));
[self assertParagraph:item.description containsItems:[GBParagraphTextItem class], @"Description", nil];
}

Expand All @@ -41,6 +42,7 @@ - (void)testProcessCommentWithStore_warnings_shouldDetectMultipleLinesDescriptio
GBCommentParagraph *paragraph = comment.firstParagraph;
[self assertParagraph:paragraph containsItems:[GBParagraphTextItem class], @"Paragraph", [GBParagraphSpecialItem class], [NSNull null], nil];
GBParagraphSpecialItem *item = [paragraph.items objectAtIndex:1];
assertThatInteger(item.specialItemType, equalToInteger(GBSpecialItemTypeWarning));
[self assertParagraph:item.description containsItems:[GBParagraphTextItem class], @"Line1 Line2", nil];
}

Expand All @@ -55,6 +57,7 @@ - (void)testProcessCommentWithStore_warnings_shouldCreateParagraphIfNoneSpecifie
GBCommentParagraph *paragraph = comment.firstParagraph;
[self assertParagraph:paragraph containsItems:[GBParagraphSpecialItem class], [NSNull null], nil];
GBParagraphSpecialItem *item = [paragraph.items objectAtIndex:0];
assertThatInteger(item.specialItemType, equalToInteger(GBSpecialItemTypeWarning));
[self assertParagraph:item.description containsItems:[GBParagraphTextItem class], @"Description", nil];
}

Expand Down

0 comments on commit 5ac13ea

Please sign in to comment.