github.com/wfusion/gofusion@v1.1.14/test/common/utils/cases/enum_test.go (about) 1 package cases 2 3 import ( 4 "context" 5 "testing" 6 7 "github.com/stretchr/testify/suite" 8 9 "github.com/wfusion/gofusion/common/utils/compress" 10 "github.com/wfusion/gofusion/log" 11 12 testUtl "github.com/wfusion/gofusion/test/common/utils" 13 ) 14 15 func TestEnum(t *testing.T) { 16 t.Parallel() 17 testingSuite := &Enum{Test: new(testUtl.Test)} 18 suite.Run(t, testingSuite) 19 } 20 21 type Enum struct { 22 *testUtl.Test 23 } 24 25 func (t *Enum) BeforeTest(suiteName, testName string) { 26 t.Catch(func() { 27 log.Info(context.Background(), "right before %s %s", suiteName, testName) 28 }) 29 } 30 31 func (t *Enum) AfterTest(suiteName, testName string) { 32 t.Catch(func() { 33 log.Info(context.Background(), "right after %s %s", suiteName, testName) 34 }) 35 } 36 37 func (t *Enum) TestSoftDeleteStatus() { 38 t.Catch(func() { 39 ctx := context.Background() 40 unknown := compress.AlgorithmUnknown 41 log.Info(ctx, "%s", unknown) 42 }) 43 }