File: types_test.go

package info (click to toggle)
golang-github-mimuret-golang-iij-dpf 0.9.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,340 kB
  • sloc: makefile: 55
file content (52 lines) | stat: -rw-r--r-- 1,246 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package types_test

import (
	"github.com/mimuret/golang-iij-dpf/pkg/types"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("types", func() {
	Context("Boolean", func() {
		Context("String", func() {
			When("Enabled", func() {
				It("return Enabled", func() {
					Expect(types.Enabled.String()).To(Equal("Enabled"))
				})
			})
			When("Disabled", func() {
				It("return Disabled", func() {
					Expect(types.Disabled.String()).To(Equal("Disabled"))
				})
			})
		})
	})
	Context("State", func() {
		Context("String", func() {
			When("Enabled", func() {
				It("return StateBeforeStart", func() {
					Expect(types.StateBeforeStart.String()).To(Equal("BeforeStart"))
				})
			})
			When("Disabled", func() {
				It("return StateRunning", func() {
					Expect(types.StateRunning.String()).To(Equal("Started"))
				})
			})
		})
	})
	Context("Favorite", func() {
		Context("String", func() {
			When("Enabled", func() {
				It("return FavoriteHighPriority", func() {
					Expect(types.FavoriteHighPriority.String()).To(Equal("High"))
				})
			})
			When("Disabled", func() {
				It("return FavoriteLowPriority", func() {
					Expect(types.FavoriteLowPriority.String()).To(Equal("Low"))
				})
			})
		})
	})
})