Пример #1
0
        public MarkpadFixture()
        {
            var directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var markpadLocation = Path.Combine(directoryName, @"..\..\..\Markpad\bin\Debug\Markpad.exe");
            Application = Application.Launch(markpadLocation);
            MainWindow = new MarkpadWindow(Application, Application.GetWindow("MarkPad"));
            TemporaryTestFilesDirectory = Path.Combine(Path.GetTempPath(), "MarkpadTest");

            if (!Directory.Exists(TemporaryTestFilesDirectory))
                Directory.CreateDirectory(TemporaryTestFilesDirectory);
        }
Пример #2
0
        public MarkpadFixture()
        {
            var directoryName       = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var environmentLocation = Environment.GetEnvironmentVariable("MarkpadLocation");
            var markpadLocation     = environmentLocation ?? Path.Combine(directoryName, @"..\..\..\Markpad\bin\Debug\Markpad.exe");

            if (!File.Exists(markpadLocation))
            {
                markpadLocation = Path.Combine(Environment.CurrentDirectory, @"..\..\..\Markpad\bin\Debug\Markpad.exe");
            }
            Application = Application.Launch(markpadLocation);
            MainWindow  = new MarkpadWindow(Application, Application.GetWindow("MarkPad"));
            TemporaryTestFilesDirectory = Path.Combine(Path.GetTempPath(), "MarkpadTest");

            if (!Directory.Exists(TemporaryTestFilesDirectory))
            {
                Directory.CreateDirectory(TemporaryTestFilesDirectory);
            }
        }
 public void SetFixture(MarkpadFixture data)
 {
     Application = Application.Launch(data.MarkpadLocation);
     MainWindow  = new MarkpadWindow(Application, Application.GetWindow(data.MarkpadTitle));
 }