started messing around with admin area

This commit is contained in:
Tom Gardham-Pallister
2017-02-13 12:13:53 +00:00
parent 0b830d9891
commit 95fc687e93
9 changed files with 37 additions and 19 deletions

View File

@ -29,9 +29,9 @@ namespace Ocelot.UnitTests.Configuration
[Fact]
public void should_get_config()
{
this.Given(x => x.GivenTheRepoReturns(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>()))))
this.Given(x => x.GivenTheRepoReturns(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>(), string.Empty))))
.When(x => x.WhenIGetTheConfig())
.Then(x => x.TheFollowingIsReturned(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>()))))
.Then(x => x.TheFollowingIsReturned(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>(), string.Empty))))
.BDDfy();
}
@ -39,9 +39,9 @@ namespace Ocelot.UnitTests.Configuration
public void should_create_config_if_it_doesnt_exist()
{
this.Given(x => x.GivenTheRepoReturns(new OkResponse<IOcelotConfiguration>(null)))
.And(x => x.GivenTheCreatorReturns(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>()))))
.And(x => x.GivenTheCreatorReturns(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>(), string.Empty))))
.When(x => x.WhenIGetTheConfig())
.Then(x => x.TheFollowingIsReturned(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>()))))
.Then(x => x.TheFollowingIsReturned(new OkResponse<IOcelotConfiguration>(new OcelotConfiguration(new List<ReRoute>(), string.Empty))))
.BDDfy();
}

View File

@ -82,6 +82,14 @@ namespace Ocelot.UnitTests.Configuration
_downstreamTemplatePath = downstreamTemplatePath;
}
public string AdministrationPath
{
get
{
throw new NotImplementedException();
}
}
public List<ReRoute> ReRoutes => new List<ReRoute>
{
new ReRouteBuilder()