Skip to content

Commit

Permalink
Merge pull request #177 from VATSIM-UK/unix-test-fixes
Browse files Browse the repository at this point in the history
Fixing unit tests
  • Loading branch information
AndyTWF authored Apr 15, 2022
2 parents eff1607 + 482c214 commit b0c27ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Compiler/Config/ConfigIncludeLoader.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Compiler.Exception;
using Compiler.Input.Rule;
using Compiler.Input.Sorter;
using Compiler.Output;
using Newtonsoft.Json.Linq;

Expand Down Expand Up @@ -103,8 +105,9 @@ string configFilePath

// Get the airport folders
string configFileFolder = GetFolderForConfigFile(configFilePath);
string[] directories =
Directory.GetDirectories(configFileFolder + Path.DirectorySeparatorChar + configItem.Key);
var directories = Directory
.GetDirectories(configFileFolder + Path.DirectorySeparatorChar + configItem.Key)
.OrderBy(directory => directory, new AlphabeticalPathSorter()).ToList();

/*
* Airports are a bit special as there are lots of them.
Expand Down
5 changes: 4 additions & 1 deletion tests/CompilerTest/Config/ConfigIncludeLoaderTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Compiler.Input.Rule;
using Compiler.Output;
using Newtonsoft.Json.Linq;
using Xunit.Abstractions;
using FileExists = Compiler.Input.Validator.FileExists;

namespace CompilerTest.Config
Expand All @@ -20,11 +21,13 @@ public class ConfigIncludeLoaderTest
{
private readonly ConfigIncludeLoader fileLoader;
private readonly ConfigInclusionRules includes;
private readonly ITestOutputHelper output;

public ConfigIncludeLoaderTest()
public ConfigIncludeLoaderTest(ITestOutputHelper output)
{
fileLoader = ConfigIncludeLoaderFactory.Make(new CompilerArguments());
includes = new ConfigInclusionRules();
this.output = output;
}

[Theory]
Expand Down

0 comments on commit b0c27ac

Please sign in to comment.