public TokenServiceTest()
 {
     configurationSection = new Mock <IConfigurationSection>();
     configuration        = new Mock <IConfiguration>();
     userManager          = CustomMock.GetMockUserManager();
     service = new TokenService(configuration.Object);
     user    = new User();
 }
 public RegisterCommandHandlerTest()
 {
     mapper      = new Mock <IMapper>();
     userManager = CustomMock.GetMockUserManager();
     command     = new RegisterCommand {
         UserName = userName, Password = password
     };
     commandHandler = new RegisterCommandHandler(mapper.Object, userManager.Object);
     user           = new User();
 }
Exemple #3
0
 public TryLoginCommandHandlerTest()
 {
     userManager    = CustomMock.GetMockUserManager();
     signInManager  = CustomMock.GetMockSignInManager();
     tokenService   = new Mock <ITokenService>();
     bus            = new Mock <IBus>();
     command        = new TryLoginCommand();
     commandHandler = new TryLoginCommandHandler(userManager.Object, signInManager.Object, tokenService.Object, bus.Object);
     user           = new User();
     tokenModel     = new TokenModel(It.IsAny <string>(), It.IsAny <string>());
 }