github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/pkg/depends/x/stringsx/naming_z_unit_test.go (about)

     1  package stringsx_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	. "github.com/onsi/gomega"
     7  
     8  	. "github.com/machinefi/w3bstream/pkg/depends/x/stringsx"
     9  )
    10  
    11  func TestNaming(t *testing.T) {
    12  	name := "i_am_a_10_years_senior"
    13  
    14  	NewWithT(t).Expect(LowerCamelCase(name)).To(Equal("iAmA10YearsSenior"))
    15  	NewWithT(t).Expect(LowerSnakeCase(name)).To(Equal("i_am_a_10_years_senior"))
    16  	NewWithT(t).Expect(UpperCamelCase(name)).To(Equal("IAmA10YearsSenior"))
    17  	NewWithT(t).Expect(UpperSnakeCase(name)).To(Equal("I_AM_A_10_YEARS_SENIOR"))
    18  
    19  	NewWithT(t).Expect(UpperCamelCase("OrgID")).To(Equal("OrgID"))
    20  }