public void unInstallIronPython()
 {
     IronPythonInstall.uninstallIronPython();
     Assert.That(false == Directory.Exists(IronPythonConfig._IronPythonRuntimeDir),
                 "IronPython Runtime directory should had been empty: {0}",
                 IronPythonConfig._IronPythonRuntimeDir);
 }
 public void installIronPython()
 {
     if (Directory.Exists(IronPythonConfig._IronPythonRuntimeDir))
     {
         unInstallIronPython();
     }
     IronPythonInstall.installIronPython();
     Assert.That(Directory.Exists(IronPythonConfig._IronPythonRuntimeDir), "Could not find IronPython Runtime directory: {0}",
                 IronPythonConfig._IronPythonRuntimeDir);
 }
        public void testIronPythonScriptExecution()
        {
            var expectedDataReceived = "5" + Environment.NewLine;

            Assert.That(IronPythonInstall.checkIronPythonInstallation(), "checkIronPythonInstallation return false");
            Assert.That(IronPythonShell.testIronPython("print 2+3", expectedDataReceived), "testIronPython failed");
            Assert.That(false == IronPythonShell.testIronPython("print 2+3", "4"), "testIronPython should had failed");

            var scriptToExecute = "print 2+3";

            var tempPyScript = DI.config.getTempFileInTempDirectory("py");

            Files.WriteFileContent(tempPyScript, scriptToExecute);

            var dataReceived = new IronPythonShell().executePythonFile(tempPyScript, "");

            Assert.That(dataReceived == expectedDataReceived, "data received did no match expectedDataReceived");
            File.Delete(tempPyScript);
        }