public TestFixture() { //var format = new Mock<ISecureDataFormat<AuthenticationTicket>>(MockBehavior.Strict); //format.Setup(mock => mock.Unprotect(It.Is<string>(token => token == "invalid-token"))) // .Returns(value: null); //format.Setup(mock => mock.Unprotect(It.Is<string>(token => token == "valid-token"))) // .Returns(delegate { // var identity = new ClaimsIdentity(OAuthValidationDefaults.AuthenticationScheme); // identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, "Fabrikam")); // var properties = new AuthenticationProperties(); // return new AuthenticationTicket(new ClaimsPrincipal(identity), // properties, OAuthValidationDefaults.AuthenticationScheme); // }); var builder = new WebHostBuilder() .UseContentRoot(Directory.GetCurrentDirectory()) .UseKestrel() .UseStartup <TStartup>() .UseEnvironment("Test"); _server = new TestServer(builder); var client = _server.CreateClient(); client.BaseAddress = new Uri("http://localhost:5000"); ApiDriver = new ApiDriver(client); }
public Service(ApiDriver apiDriver) { ApiDriver = apiDriver; }
public ProviderAssignmentSync(ApiDriver apiDriver) { this.apiDriver = apiDriver; }
public ProductService(ApiDriver apiDriver) : base(apiDriver) { }