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

Function TestDetectProject_Android

internal/cli/quickstart_detect_test.go:668–680  ·  view source on GitHub ↗

Auth0 qs setup --app --type native --framework android.

(t *testing.T)

Source from the content-addressed store, hash-verified

666
667// Auth0 qs setup --app --type native --framework android.
668func TestDetectProject_Android(t *testing.T) {
669 dir := t.TempDir()
670 // Create the AndroidManifest.xml in its standard location.
671 mkTestDir(t, dir, filepath.Join("app", "src", "main"))
672 writeTestFile(t, filepath.Join(dir, "app", "src", "main"), "AndroidManifest.xml",
673 `<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.app"/>`)
674
675 got := DetectProject(dir)
676 assert.True(t, got.Detected)
677 assert.Equal(t, "android", got.Framework)
678 assert.Equal(t, "native", got.Type)
679 assert.Equal(t, "gradle", got.BuildTool)
680}
681
682// Android must win over the Java build.gradle check when AndroidManifest.xml is present.
683func TestDetectProject_Android_BeatsVanillaJava(t *testing.T) {

Callers

nothing calls this directly

Calls 3

mkTestDirFunction · 0.85
writeTestFileFunction · 0.85
DetectProjectFunction · 0.85

Tested by

no test coverage detected