public static void Register(IServiceCollection services) { services.AddScoped <Mapper>((provider) => { return(MapperHelpers.GetConfiguredMapper()); }); }
public async Task ShouldCreateUser() { var dto = new UserDto { UserName = "******" }; var mapper = MapperHelpers.GetConfiguredMapper(); var repository = new TestRepository <User>(); var userService = new UserService(repository, mapper); await userService.CreateUserAsync(dto); Assert.Contains(await repository.AllAsync(), (u) => u.Username == dto.UserName); }
public MessageServiceTests() { _mapper = MapperHelpers.GetConfiguredMapper(); }
public BlackListServiceTest() { _mapper = MapperHelpers.GetConfiguredMapper(); }
public ConversationUserServiceTest() { _mapper = MapperHelpers.GetConfiguredMapper(); }