func TestMaybeFlatmap(t *testing.T) { lst := lists.NewList([]lists.Maybe{ lists.CreateBooleanResult(true), lists.CreateBooleanResult(false), lists.CreateBooleanResult(true), }).FlatMap() assert.Equal(t, 2, lst.Count()) }
func TestTrueMaybe(t *testing.T) { result := lists.CreateBooleanResult(true) count := result.Count() assert.Equal(t, 1, count) }
func TestFalseMaybe(t *testing.T) { result := lists.CreateBooleanResult(false) count := result.Count() assert.Equal(t, 0, count) }