public void CreateMethod() { // preparation var userRepo = new Mock <IUserRepository>(); var cryption = new Mock.CryptionServiceMock(); var logger = new Mock.LoggerMock <RegisterApi>(); var registerApi = new RegisterApi(userRepo.Object, cryption, logger); }
public async Task RunAsyncMethod() { // preparation var userRepo = new Mock <IUserRepository>(); var cryption = new Mock.CryptionServiceMock(); var logger = new Mock.LoggerMock <RegisterApi>(); var registerApi = new RegisterApi(userRepo.Object, cryption, logger); var context = new Mock.HttpContextMock(); // action await registerApi.RunAsync(context.Request); // assert }