[Test] public void setup() { var apiNuGet = new API_NuGet(); if (apiNuGet.NuGet_Exe.fileExists()) { apiNuGet.NuGet_Exe.assert_File_Deleted(); } apiNuGet.setup().assert_Not_Null(); apiNuGet.NuGet_Exe.assert_File_Exists(); apiNuGet.NuGet_Exe.assert_File_Deleted(); apiNuGet.NuGet_Exe_Download_Uri = null; apiNuGet.setup().assert_Is_Null(); apiNuGet.NuGet_Exe.assert_File_Not_Exists(); }
[Test] public void setup() { var apiNuGet_Setup = new API_NuGet(); apiNuGet_Setup.NuGet_Exe = "_temp_NuGet".temp_Dir().path_Combine("nuget.exe"); //we need to change this, or there will be a lock on the nuget.exe (when used by another test) if(apiNuGet_Setup.NuGet_Exe.fileExists()) apiNuGet_Setup.NuGet_Exe.assert_File_Deleted(); apiNuGet_Setup.setup() .assert_Not_Null(); apiNuGet_Setup.NuGet_Exe.assert_File_Exists(); apiNuGet_Setup.NuGet_Exe.assert_File_Deleted(); apiNuGet_Setup.NuGet_Exe_Download_Uri = null; apiNuGet_Setup.setup() .assert_Is_Null(); apiNuGet_Setup.NuGet_Exe.assert_File_Not_Exists(); }