Beispiel #1
0
        private async Task Test_Simple()
        {
            // Arrange

            foreach (var package in new[] { "DepA", "DepB", "DepC" })
            {
                PackTool.Process(new PackTool.Options
                {
                    ProjectFile     = TestHelper.GetDataPath(package + ".json"),
                    OutputDirectory = TestHelper.GetOutputPath()
                });
            }

            var restorePath = TestHelper.CreateOutputPath("Restore");
            await RestoreTool.Process(new RestoreTool.Options
            {
                ProjectFile              = TestHelper.GetDataPath("DepD.json"),
                OutputDirectory          = restorePath,
                LocalRepositoryDirectory = TestHelper.GetOutputPath()
            });

            // Act

            RemoveTool.Process(new RemoveTool.Options
            {
                ProjectDir = restorePath
            });

            // Assert

            var basePath = Path.Combine(restorePath, "Assets", "UnityPackages");

            AssertFileNotExistsWithMeta(basePath, "DepA.unitypackage.json");
            AssertFileNotExistsWithMeta(basePath, "DepA", "FileA.txt");
            AssertFileNotExistsWithMeta(basePath, "DepB.unitypackage.json");
            AssertFileNotExistsWithMeta(basePath, "DepB", "FileB.txt");
            AssertFileNotExistsWithMeta(basePath, "DepC.unitypackage.json");
            AssertFileNotExistsWithMeta(basePath, "DepC", "FileC.txt");
            AssertFolderNotExists(basePath);
            AssertFolderNotExists(basePath, "DepA");
            AssertFolderNotExists(basePath, "DepB");
            AssertFolderNotExists(basePath, "DepC");
        }
    private void Actions()
    {
        SocialPlatfromSettings.Instance.ShowActions = EditorGUILayout.Foldout(SocialPlatfromSettings.Instance.ShowActions, "More Actions");
        if (SocialPlatfromSettings.Instance.ShowActions)
        {
            if (!Instalation.IsFacebookInstalled)
            {
                GUI.enabled = false;
            }

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();

            if (GUILayout.Button("Remove Facebook SDK", GUILayout.Width(160)))
            {
                Instalation.Remove_FB_SDK_WithDialog();
            }

            if (GUILayout.Button("Reset Settings", GUILayout.Width(160)))
            {
                ResetSettings();
            }

            GUI.enabled = true;


            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space();


            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();


            if (GUILayout.Button("Load Example Settings", GUILayout.Width(160)))
            {
                LoadExampleSettings();
            }


            if (GUILayout.Button("Reinstall", GUILayout.Width(160)))
            {
                Instalation.Android_UpdatePlugin();
                Instalation.IOS_UpdatePlugin();
                UpdateVersionInfo();
            }


            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space();


            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.Space();

            if (GUILayout.Button("Remove", GUILayout.Width(160)))
            {
                RemoveTool.RemovePlugins();
            }

            EditorGUILayout.EndHorizontal();
        }
    }