public void BuildAdapterPluginTest() { //Arrange and Act UserAdapter userAdapter = harness.CreateUserAdapter(); //Assert Assert.IsTrue(userAdapter is UserAdapter); }
public void BuildAdapterPluginTest() { //Arrange and Act UserServiceFactory _harness1 = new UserServiceFactory(); UserAdapter userAdapter = _harness1.CreateUserAdapter(); //Assert Assert.IsTrue(userAdapter is UserAdapter); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { UserServiceFactory userServiceFactory = new UserServiceFactory(); IUserPlugin userPlugin = userServiceFactory.CreateUserPlugin("mysql"); UserAdapter userAdapter = userServiceFactory.CreateUserAdapter(userPlugin); UserService userService = userServiceFactory.CreateUserService(userAdapter); services.AddSingleton <IUserService>(s => userService); services.AddRazorPages(); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { UserServiceFactory userServiceFactory = new UserServiceFactory(); iUserPlugin userPlugin = userServiceFactory.CreateUserPlugin("mysql"); UserAdapter userAdapter = userServiceFactory.CreateUserAdapter(userPlugin); UserService userService = userServiceFactory.CreateUserService(userAdapter); BlabServiceFactory blabServiceFactory = new BlabServiceFactory(); iBlabPlugin blabPlugin = blabServiceFactory.CreateBlabPlugin("mysql"); BlabAdapter blabAdapter = blabServiceFactory.CreateBlabAdapter(blabPlugin); BlabService blabService = blabServiceFactory.CreateBlabService(blabAdapter); services.AddSingleton <iUserService>(s => userService); services.AddSingleton <iBlabService>(s => blabService); services.AddRazorPages(); }
public void BuildAdapterPluginTest() { var userAdapter = harness.CreateUserAdapter(); Assert.IsTrue(userAdapter is UserAdapter); }