Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

Commit

Permalink
Test SequenceDiagram.Link failures
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoryv committed Aug 19, 2019
1 parent d2f3d0e commit 30d23fd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions link_test.go
Expand Up @@ -20,3 +20,17 @@ func TestLink_class(t *testing.T) {
assert().Equals(got, c.exp)
}
}

func TestSequenceDiagram_Link_missing_from_column(t *testing.T) {
dia := &SequenceDiagram{}
defer func() { recover() }()
dia.Link("a", "b", "..")
t.Fail()
}

func TestSequenceDiagram_Link_missing_to_column(t *testing.T) {
dia := &SequenceDiagram{columns: []string{"a"}}
defer func() { recover() }()
dia.Link("a", "b", "..")
t.Fail()
}

0 comments on commit 30d23fd

Please sign in to comment.