Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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
        }