MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestReadDotnetMobileBundleID

Function TestReadDotnetMobileBundleID

internal/cli/quickstart_detect_test.go:2852–2872  ·  view source on GitHub ↗

-- readDotnetMobileBundleID --.

(t *testing.T)

Source from the content-addressed store, hash-verified

2850// -- readDotnetMobileBundleID --.
2851
2852func TestReadDotnetMobileBundleID(t *testing.T) {
2853 t.Run("reads ApplicationId from csproj content", func(t *testing.T) {
2854 content := `<Project Sdk="Microsoft.NET.Sdk">
2855 <PropertyGroup>
2856 <ApplicationId>com.example.myapp</ApplicationId>
2857 <TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
2858 </PropertyGroup>
2859</Project>`
2860 assert.Equal(t, "com.example.myapp", readDotnetMobileBundleID(content))
2861 })
2862
2863 t.Run("no ApplicationId returns empty", func(t *testing.T) {
2864 content := `<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup></PropertyGroup></Project>`
2865 assert.Empty(t, readDotnetMobileBundleID(content))
2866 })
2867
2868 t.Run("ApplicationId with whitespace is trimmed", func(t *testing.T) {
2869 content := `<ApplicationId> com.example.app </ApplicationId>`
2870 assert.Equal(t, "com.example.app", readDotnetMobileBundleID(content))
2871 })
2872}
2873
2874// -- DetectProject BundleID population --.
2875

Callers

nothing calls this directly

Calls 1

readDotnetMobileBundleIDFunction · 0.85

Tested by

no test coverage detected