Debian Codegraph @

pkg/types/types_test.go

raw
1 package types_test
2
3 import (
4 "github.com/mimuret/golang-iij-dpf/pkg/types"
5 . "github.com/onsi/ginkgo"
6 . "github.com/onsi/gomega"
7 )
8
9 var _ = Describe("types", func() {
10 Context("Boolean", func() {
11 Context("String", func() {
12 When("Enabled", func() {
13 It("return Enabled", func() {
14 Expect(types.Enabled.String()).To(Equal("Enabled"))
15 })
16 })
17 When("Disabled", func() {
18 It("return Disabled", func() {
19 Expect(types.Disabled.String()).To(Equal("Disabled"))
20 })
21 })
22 })
23 })
24 Context("State", func() {
25 Context("String", func() {
26 When("Enabled", func() {
27 It("return StateBeforeStart", func() {
28 Expect(types.StateBeforeStart.String()).To(Equal("BeforeStart"))
29 })
30 })
31 When("Disabled", func() {
32 It("return StateRunning", func() {
33 Expect(types.StateRunning.String()).To(Equal("Started"))
34 })
35 })
36 })
37 })
38 Context("Favorite", func() {
39 Context("String", func() {
40 When("Enabled", func() {
41 It("return FavoriteHighPriority", func() {
42 Expect(types.FavoriteHighPriority.String()).To(Equal("High"))
43 })
44 })
45 When("Disabled", func() {
46 It("return FavoriteLowPriority", func() {
47 Expect(types.FavoriteLowPriority.String()).To(Equal("Low"))
48 })
49 })
50 })
51 })
52 })