Skip to content
This repository has been archived by the owner on Aug 7, 2022. It is now read-only.

Commit

Permalink
Updated Unit Tests with new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Dec 3, 2019
1 parent b29eba1 commit 2276d28
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions OMODFramework.Test/ATest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ public abstract class ATest
[TestInitialize]
public void Setup()
{
Framework.TempDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestTempDir");
Framework.Settings.TempPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestTempDir");

if (!Directory.Exists(Framework.TempDir))
Directory.CreateDirectory(Framework.TempDir);
if (!Directory.Exists(Framework.Settings.TempPath))
Directory.CreateDirectory(Framework.Settings.TempPath);
else
Framework.CleanTempDir();

Expand Down
2 changes: 1 addition & 1 deletion OMODFramework.Test/CompressionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class CompressionTests
[TestInitialize]
public void Setup()
{
Framework.TempDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestTempDir");
Framework.Settings.TempPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestTempDir");

File.WriteAllText(HelloFile, "Hello World!");
}
Expand Down
8 changes: 4 additions & 4 deletions OMODFramework.Test/EndToEndTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ public class EndToEndTest
[TestInitialize]
public void Setup()
{
Framework.TempDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestTempDir");
Framework.Settings.TempPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "TestTempDir");

if (!Directory.Exists(Framework.TempDir))
Directory.CreateDirectory(Framework.TempDir);
if (!Directory.Exists(Framework.Settings.TempPath))
Directory.CreateDirectory(Framework.Settings.TempPath);
else
Framework.CleanTempDir();

OMODFile = Path.Combine(Framework.TempDir, "ILoveTesting.omod");
OMODFile = Path.Combine(Framework.Settings.TempPath, "ILoveTesting.omod");
ModFiles = new List<string>();
FolderStructure = new List<string>();

Expand Down
8 changes: 4 additions & 4 deletions OMODFramework.Test/OMODTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ public void TestCreation()
{
if(File.Exists("test.omod"))
File.Delete("test.omod");
Directory.CreateDirectory(Path.Combine(Framework.TempDir, "text_files"));
Directory.CreateDirectory(Path.Combine(Framework.Settings.TempPath, "text_files"));

var file1 = Path.Combine(Framework.TempDir, "file.txt");
var file2 = Path.Combine(Framework.TempDir, "file2.txt");
var file3 = Path.Combine(Framework.TempDir, "text_files", "file3.txt");
var file1 = Path.Combine(Framework.Settings.TempPath, "file.txt");
var file2 = Path.Combine(Framework.Settings.TempPath, "file2.txt");
var file3 = Path.Combine(Framework.Settings.TempPath, "text_files", "file3.txt");

var text1 = "This is some text";
var text2 = "This is more text";
Expand Down

0 comments on commit 2276d28

Please sign in to comment.