Skip to content

Commit

Permalink
Fix unchecked code in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jelovirt committed May 10, 2018
1 parent 396d5a7 commit c0fcf50
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
import com.elovirta.dita.markdown.renderer.Metadata;
import org.junit.Test;

import java.util.Arrays;
import java.util.Collections;

import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
import static org.junit.Assert.assertEquals;

public class ToDitaSerializerTest {

@Test
public void testParseMetadata() {
assertEqualsMetadata(new Metadata("foo", Collections.EMPTY_LIST), Metadata.parse("#foo"));
assertEqualsMetadata(new Metadata("foo", Collections.EMPTY_LIST), Metadata.parse(" #foo "));
assertEqualsMetadata(new Metadata("bar", Collections.EMPTY_LIST), Metadata.parse("#foo #bar"));
assertEqualsMetadata(new Metadata(null, Arrays.asList("foo")), Metadata.parse(".foo"));
assertEqualsMetadata(new Metadata(null, Arrays.asList("foo", "bar")), Metadata.parse(" .foo .bar "));
assertEqualsMetadata(new Metadata("baz", Arrays.asList("foo", "bar")), Metadata.parse(".foo #baz .bar"));
assertEqualsMetadata(new Metadata("foo", emptyList()), Metadata.parse("#foo"));
assertEqualsMetadata(new Metadata("foo", emptyList()), Metadata.parse(" #foo "));
assertEqualsMetadata(new Metadata("bar", emptyList()), Metadata.parse("#foo #bar"));
assertEqualsMetadata(new Metadata(null, asList("foo")), Metadata.parse(".foo"));
assertEqualsMetadata(new Metadata(null, asList("foo", "bar")), Metadata.parse(" .foo .bar "));
assertEqualsMetadata(new Metadata("baz", asList("foo", "bar")), Metadata.parse(".foo #baz .bar"));
}

private void assertEqualsMetadata(final Metadata exp, final Metadata act) {
Expand Down

0 comments on commit c0fcf50

Please sign in to comment.