func TestComposeAllComposeAll(t *testing.T) { abc := ComposeAll(a, b, c) cba := ComposeAll(c, b, a) abccba := ComposeAll(abc, cba) testutils.RunTest(abccba, "ABCCBA", t) }
func TestFold(t *testing.T) { testutils.RunTest(fold(Compose, a, []Middleware{b, c}), "ABC", t) }
func TestIdCompose(t *testing.T) { testutils.RunTest(Id().Compose(a).Compose(b), "AB", t) }
func TestCompositionChain(t *testing.T) { testutils.RunTest(ComposeAll().Compose(a).Compose(b), "AB", t) }
func TestEmptyComposeAll(t *testing.T) { testutils.RunTest(ComposeAll(), "", t) }
func TestSingleComposeAll(t *testing.T) { testutils.RunTest(ComposeAll(a), "A", t) }
func TestComposeAll(t *testing.T) { testutils.RunTest(ComposeAll(a, b, c), "ABC", t) }
func TestCompose(t *testing.T) { testutils.RunTest(Compose(a, b), "AB", t) }