#296 change so tests pass on windows

This commit is contained in:
Tom Pallister
2018-04-17 21:51:41 +01:00
parent b7ff73729f
commit e94df4749c
4 changed files with 30 additions and 31 deletions

View File

@ -12,14 +12,14 @@ using Ocelot.Configuration.Repository;
namespace Ocelot.UnitTests.Configuration
{
public class FileConfigurationRepositoryTests : IDisposable
public class FileConfigurationRepositoryTests
{
private readonly Mock<IHostingEnvironment> _hostingEnvironment = new Mock<IHostingEnvironment>();
private IFileConfigurationRepository _repo;
private FileConfiguration _result;
private FileConfiguration _fileConfiguration;
// This is a bit dirty and it is dev.dev so that the configuration tests
// This is a bit dirty and it is dev.dev so that the ConfigurationBuilderExtensionsTests
// cant pick it up if they run in parralel..sigh these are not really unit
// tests but whatever...
private string _environmentName = "DEV.DEV";
@ -225,10 +225,5 @@ namespace Ocelot.UnitTests.Configuration
ReRoutes = reRoutes
};
}
public void Dispose()
{
File.Delete($"./ocelot.{_environmentName}.json");
}
}
}

View File

@ -149,6 +149,7 @@ namespace Ocelot.UnitTests.Configuration
.Then(x => ThenTheFollowingDownstreamIsReturned(downstream))
.BDDfy();
}
[Fact]
public void should_add_trace_id_header()
{

View File

@ -1,16 +1,14 @@
using Microsoft.Extensions.Configuration;
using Ocelot.DependencyInjection;
using Shouldly;
using TestStack.BDDfy;
using Xunit;
namespace Ocelot.UnitTests.DependencyInjection
namespace Ocelot.UnitTests.DependencyInjection
{
using System;
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using Ocelot.Configuration.File;
using Microsoft.Extensions.Configuration;
using Ocelot.DependencyInjection;
using Shouldly;
using TestStack.BDDfy;
using Xunit;
public class ConfigurationBuilderExtensionsTests
{