github.com/yaegashi/msgraph.go@v0.1.4/gen/initialism_test.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestLintName(t *testing.T) {
     9  	tests := []struct {
    10  		input, output string
    11  	}{
    12  		{"UserId", "UserID"},
    13  		{"SkuId", "SKUID"},
    14  		{"IpAddress", "IPAddress"},
    15  		{"VpnDnsRule", "VPNDNSRule"},
    16  		{"Oauth2PermissionScopes", "OAuth2PermissionScopes"},
    17  		{"WindowsWifiConfiguration", "WindowsWiFiConfiguration"},
    18  		{"SubscribedSkus", "SubscribedSKUs"},
    19  		{"DefaultIosEnrollmentProfile", "DefaultIOSEnrollmentProfile"},
    20  	}
    21  	for i, tt := range tests {
    22  		t.Run(fmt.Sprintf("%d:%s", i+1, tt.input), func(t *testing.T) {
    23  			output := lintName(tt.input)
    24  			if tt.output != output {
    25  				t.Errorf("Mismatch input %q want %q got %q", tt.input, tt.output, output)
    26  			}
    27  		})
    28  	}
    29  }