Esempio n. 1
0
        public async Task ValidateEmailSettingTest()
        {
            var basicSetup = InitializeBasicSetupParameters();

            _emailService.Setup(x => x.SendMailAsync(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>())).Returns(Task.FromResult(true));
            var result = await _basicSetupRepository.ValidateEmailSetting(basicSetup.EmailSettings);

            Assert.True(result);
        }
Esempio n. 2
0
 public async Task<IActionResult> ValidateEmailSettings([FromBody] EmailSettings model)
 {
     if (ModelState.IsValid)
         return Ok(await _basicSetup.ValidateEmailSetting(model));
     return BadRequest();
 }