Esempio n. 1
0
 public void CreateMethod()
 {
     // preparation
     var userRepo     = new Mock <IUserRepository>();
     var notification = new Mock.NotificationServiceMock();
     var infection    = new Mock.InfectionServiceMock();
     var validation   = new Mock.ValidationUserServiceMock();
     var logger       = new Mock.LoggerMock <UserApi>();
     var userApi      = new UserApi(userRepo.Object, notification, infection, validation, logger);
 }
Esempio n. 2
0
        public void RunMethod(string userUuid, string userMajor, string userMinor)
        {
            // preparation
            var userRepo     = new Mock <IUserRepository>();
            var notification = new Mock.NotificationServiceMock();
            var infection    = new Mock.InfectionServiceMock();
            var validation   = new Mock.ValidationUserServiceMock();
            var logger       = new Mock.LoggerMock <UserApi>();
            var userApi      = new UserApi(userRepo.Object, notification, infection, validation, logger);
            var context      = new Mock.HttpContextMock();

            // action
            userApi.Run(context.Request, userUuid, userMajor, userMinor);
            // assert
        }