// TODO: [InlineData ("MacProject", Platform.MacOS, null)] not implemented yet public void GetProjectPath(string projectName, Platform platform, 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, platform); Assert.AreEqual(Path.Combine(generator.OutputDirectoryPath, expectedName), path); }
public void GetProjectPathWatchOS(string projectName, BCLTestProjectGenerator.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.Equal(Path.Combine(generator.OutputDirectoryPath, expectedName), path); }
public void GenerateWatchProject(string projectName, string plistPath) { var generator = new BCLTestProjectGenerator(outputdir, outputdir, outputdir, outputdir, outputdir); var template = $"{BCLTestProjectGenerator.NameKey} {BCLTestProjectGenerator.WatchOSTemplatePathKey} {BCLTestProjectGenerator.PlistKey} {BCLTestProjectGenerator.WatchOSCsporjAppKey}"; var generatedProject = generator.GenerateWatchProject(projectName, template, plistPath); Assert.DoesNotContain(BCLTestProjectGenerator.NameKey, generatedProject); Assert.Contains(projectName, generatedProject); Assert.DoesNotContain(BCLTestProjectGenerator.WatchOSTemplatePathKey, generatedProject); Assert.DoesNotContain(BCLTestProjectGenerator.PlistKey, generatedProject); Assert.Contains(plistPath, generatedProject); }
public void GetRegisterTypeNode(string registerPath) { var fixedPath = registerPath.Replace("/", "\\"); var sb = new StringBuilder(); sb.AppendLine($"<Compile Include=\"{registerPath}\">"); sb.AppendLine($"<Link>{Path.GetFileName (registerPath)}</Link>"); sb.AppendLine("</Compile>"); var expected = sb.ToString(); Assert.Equal(expected, BCLTestProjectGenerator.GetRegisterTypeNode(registerPath)); }
public void GetReferenceNode(string assembly, string hint) { var fixedHint = hint.Replace("/", "\\"); var sb = new StringBuilder(); sb.AppendLine($"<Reference Include=\"{assembly}\" >"); sb.AppendLine($"<HintPath>{fixedHint}</HintPath>"); sb.AppendLine("</Reference>"); var expected = sb.ToString(); Assert.Equal(expected, BCLTestProjectGenerator.GetReferenceNode(assembly, hint)); }
public BCLTestImportTargetFactory(Harness harness) { Harness = harness; var outputDir = Path.GetFullPath(Path.Combine(Harness.RootDirectory, "bcl-test", "BCLTests")); var projectTemplatePath = outputDir; var registerTypesTemplatePath = Path.Combine(outputDir, "RegisterType.cs.in"); var plistTemplatePath = outputDir; projectGenerator = new BCLTestProjectGenerator(outputDir, Harness.MONO_PATH, projectTemplatePath, registerTypesTemplatePath, plistTemplatePath) { Override = true }; }
public BCLTestImportTargetFactory(Harness harness) { Harness = harness; var outputDir = Path.GetFullPath(Path.Combine(Harness.RootDirectory, "bcl-test", "BCLTests")); var projectTemplatePath = outputDir; var registerTypesTemplatePath = Path.Combine(outputDir, "RegisterType.cs.in"); var plistTemplatePath = outputDir; projectGenerator = new BCLTestProjectGenerator(outputDir, Harness.MONO_PATH, projectTemplatePath, registerTypesTemplatePath, plistTemplatePath) { iOSMonoSDKPath = Harness.MONO_SDK_DESTDIR, Override = true, GuidGenerator = Harness.NewStableGuid, GroupTests = Harness.InJenkins || Harness.UseGroupedApps, }; }
public void GetReferenceNodeNullHint(string assembly) { var expected = $"<Reference Include=\"{assembly}\" />"; Assert.Equal(expected, BCLTestProjectGenerator.GetReferenceNode(assembly)); }
public void GetPListPathWatchOS(string rootDir, BCLTestProjectGenerator.WatchAppType appType, string expectedName) { var path = BCLTestProjectGenerator.GetPListPath(rootDir, appType); Assert.Equal(Path.Combine(rootDir, expectedName), path); }
// TODO: [InlineData ("/usr/mac/path", Platform.MacOS)] not implemented yet public void GetPListPath(string rootDir, Platform platform, string expectedName) { var path = BCLTestProjectGenerator.GetPListPath(rootDir, platform); Assert.Equal(Path.Combine(rootDir, expectedName), path); }