MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / TestConvertToStructFieldName

Function TestConvertToStructFieldName

model/model_test.go:675–694  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

673}
674
675func TestConvertToStructFieldName(t *testing.T) {
676 tests := []struct {
677 input string
678 expected string
679 }{
680 {"firstName", "FirstName"},
681 {"email", "Email"},
682 {"First_name", "First_name"},
683 {"", ""},
684 {"a", "A"},
685 {"ABC", "ABC"},
686 }
687
688 for _, tc := range tests {
689 t.Run(tc.input, func(t *testing.T) {
690 result := convertToStructFieldName(tc.input)
691 assert.Equal(t, tc.expected, result)
692 })
693 }
694}
695
696func TestIdentity_IsFieldTokenized(t *testing.T) {
697 t.Run("Nil metadata", func(t *testing.T) {

Callers

nothing calls this directly

Calls 1

convertToStructFieldNameFunction · 0.70

Tested by

no test coverage detected