Use callback to update invoice state instead of long polling

This commit is contained in:
nicolas.dorier
2017-10-12 16:33:53 +09:00
parent 212a816598
commit bae08b6966
21 changed files with 936 additions and 63 deletions

View File

@@ -8,16 +8,21 @@ namespace BTCPayServer.Tests.Mocks
{
public class UrlHelperMock : IUrlHelper
{
Uri _BaseUrl;
public UrlHelperMock(Uri baseUrl)
{
_BaseUrl = baseUrl;
}
public ActionContext ActionContext => throw new NotImplementedException();
public string Action(UrlActionContext actionContext)
{
return "http://127.0.0.1/mock";
return $"{_BaseUrl}mock";
}
public string Content(string contentPath)
{
return "http://127.0.0.1/mock";
return $"{_BaseUrl}{contentPath}";
}
public bool IsLocalUrl(string url)
@@ -27,12 +32,12 @@ namespace BTCPayServer.Tests.Mocks
public string Link(string routeName, object values)
{
return "http://127.0.0.1/mock";
return _BaseUrl.AbsoluteUri;
}
public string RouteUrl(UrlRouteContext routeContext)
{
return "http://127.0.0.1/mock";
return _BaseUrl.AbsoluteUri;
}
}
}