public void ThrowIfContextIsNotHttpContext() { var context = new Object(); var strategy = new BasePathMultiTenantStrategy(); Assert.Throws <MultiTenantException>(() => strategy.GetIdentifier(context)); }
[InlineData("/initech/ignore/ignore", "initech")] // multiple path segments public void ReturnExpectedIdentifier(string path, string expected) { var httpContext = CreateHttpContextMock(path); var strategy = new BasePathMultiTenantStrategy(); var identifier = strategy.GetIdentifier(httpContext); Assert.Equal(expected, identifier); }