public ApplicationOptionsTest() { var tmpPath = Path.GetTempPath(); registerTypesTemplatePath = Path.Combine(tmpPath, Path.GetRandomFileName()); WriteJunk(registerTypesTemplatePath); projectTemplatePath = Path.Combine(tmpPath, Path.GetRandomFileName()); WriteJunk(projectTemplatePath); plistTemplatePath = Path.Combine(tmpPath, Path.GetRandomFileName()); WriteJunk(plistTemplatePath); outputPath = Path.Combine(tmpPath, Path.GetRandomFileName()); monoCheckout = Path.Combine(tmpPath, Path.GetRandomFileName()); var testDir = BCLTestAssemblyDefinition.GetTestDirectoryFromMonoPath(monoCheckout, platform); if (Directory.Exists(testDir)) { return; } // we need to create the mono dir and the test dir if (!Directory.Exists(testDir)) { Directory.CreateDirectory(testDir); } }
public void GetPathMacOS() { var testAssemblyDefinition = new BCLTestAssemblyDefinition("MONOTOUCH_System.Json.Microsoft_xunit-test.dll"); var home = Environment.GetEnvironmentVariable("HOME"); var expectedPath = Path.Combine(home, "mcs/class/lib", "xammac", "tests", testAssemblyDefinition.Name); Assert.Equal(expectedPath, testAssemblyDefinition.GetPath(Environment.GetEnvironmentVariable("HOME"), Platform.MacOSFull)); }
public void GetPathWatchOS() { var testAssemblyDefinition = new BCLTestAssemblyDefinition("monotouch_System.Json.Microsoft_xunit-test.dll"); var home = Environment.GetEnvironmentVariable("HOME"); var expectedPath = Path.Combine(home, "mcs/class/lib", "monotouch_watch", "tests", testAssemblyDefinition.Name.Replace("monotouch", "monotouch_watch")); Assert.AreEqual(expectedPath, testAssemblyDefinition.GetPath(Environment.GetEnvironmentVariable("HOME"), Platform.WatchOS, false)); }
public void IsXUnit() { var testAssemblyDefinition = new BCLTestAssemblyDefinition("MONOTOUCH_System.Json.Microsoft_xunit-test.dll"); Assert.True(testAssemblyDefinition.IsXUnit); }
public void GetPathNullMonoRoot() { var testAssemblyDefinition = new BCLTestAssemblyDefinition("MONOTOUCH_System.Json.Microsoft_test.dll"); Assert.Throws <ArgumentNullException> (() => testAssemblyDefinition.GetPath(null, Platform.iOS)); }
public void IsNotXUnit() { var testAssemblyDefinition = new BCLTestAssemblyDefinition("monotouch_System.Json.Microsoft_test.dll"); Assert.False(testAssemblyDefinition.IsXUnit); }