示例#1
0
        public void GetProjectPathWatchOSTest(string projectName, WatchAppType appType, string expectedName)
        {
            // ignore the fact that all params are the same, we do not care
            var path = template.GetProjectPath(projectName, appType);

            Assert.AreEqual(Path.Combine(template.OutputDirectoryPath, expectedName), path);
        }
示例#2
0
        public void GetProjectPathWatchOSTest(string projectName, WatchAppType appType, string expectedName)
        {
            // ignore the fact that all params are the same, we do not care
            var path = template.GetProjectPath(projectName, appType);

            Assert.AreEqual(Path.Combine(template.OutputDirectoryPath, "generated", Platform.WatchOS.ToString(), projectName, appType.ToString().ToLowerInvariant(), expectedName), path);
        }
        public void GetProjectPathWatchOS(string projectName, WatchAppType appType, string expectedName)
        {
            // ignore the fact that all params are the same, we do not care
            var generator = new BCLTestProjectGenerator(outputdir, outputdir, outputdir, outputdir, outputdir);
            var path      = generator.GetProjectPath(projectName, appType);

            Assert.AreEqual(Path.Combine(generator.OutputDirectoryPath, expectedName), path);
        }
示例#4
0
        /// <summary>
        /// Returns the path to be used to store the projects plist file depending on the watch application type.
        /// </summary>
        /// <param name="rootDir">The root dir to use.</param>
        /// <param name="appType">The watchOS application path whose plist we want to generate.</param>
        /// <returns></returns>
        public static string GetPListPath(string rootDir, WatchAppType appType)
        {
            switch (appType)
            {
            case WatchAppType.App:
                return(Path.Combine(rootDir, "Info-watchos-app.plist"));

            default:
                return(Path.Combine(rootDir, "Info-watchos-extension.plist"));
            }
        }
示例#5
0
        /// <summary>
        /// Returns the path to be used to store the project file depending on the type of watchOS
        /// app that is generated.
        /// </summary>
        /// <param name="projectName">The name of the project being generated.</param>
        /// <param name="appType">The typoe of watcOS application.</param>
        /// <returns>The final path to which the project file should be written.</returns>
        public string GetProjectPath(string projectName, WatchAppType appType)
        {
            switch (appType)
            {
            case WatchAppType.App:
                return(Path.Combine(OutputDirectoryPath, $"{projectName}-watchos-app.csproj"));

            default:
                return(Path.Combine(OutputDirectoryPath, $"{projectName}-watchos-extension.csproj"));
            }
        }
        /// <summary>
        /// Returns the path to be used to store the project file depending on the type of watchOS
        /// app that is generated.
        /// </summary>
        /// <param name="projectName">The name of the project being generated.</param>
        /// <param name="appType">The typoe of watcOS application.</param>
        /// <returns>The final path to which the project file should be written.</returns>
        public string GetProjectPath(string projectName, WatchAppType appType)
        {
            string rv;

            switch (appType)
            {
            case WatchAppType.App:
                rv = Path.Combine(GetOutputPath(projectName, Platform.WatchOS), "app", $"{projectName}-watchos-app.csproj");
                break;

            default:
                rv = Path.Combine(GetOutputPath(projectName, Platform.WatchOS), "extension", $"{projectName}-watchos-extension.csproj");
                break;
            }
            Directory.CreateDirectory(Path.GetDirectoryName(rv));
            return(rv);
        }
示例#7
0
        public void GetPListPathWatchOSTest(string rootDir, WatchAppType appType, string expectedName)
        {
            var path = XamariniOSTemplate.GetPListPath(rootDir, appType);

            Assert.AreEqual(Path.Combine(rootDir, expectedName), path);
        }
 public Stream GetProjectTemplate(WatchAppType appType) => GetTemplateStream(watchOSProjectTemplateMatches [appType]);
示例#9
0
 public Stream GetPlistTemplate(WatchAppType appType) => GetTemplateStream(s_watchOSPlistTemplateMatches[appType]);
 public string GetPlistTemplate(WatchAppType appType) => GetTemplateStream(watchOSPlistTemplateMatches [appType]);
        public void GetPListPathWatchOS(string rootDir, WatchAppType appType, string expectedName)
        {
            var path = BCLTestProjectGenerator.GetPListPath(rootDir, appType);

            Assert.AreEqual(Path.Combine(rootDir, expectedName), path);
        }