public void IsLetterNameExists() { var mockLetterTemplateLogic = new Mock <ILetterTemplateRepository>(); mockLetterTemplateLogic.Setup(f => f.IsLetterNameExists(It.IsAny <LetterTemplate>())).Returns(true); LetterTemplateLogic target = new LetterTemplateLogic(mockLetterTemplateLogic.Object); bool actual = target.IsLetterNameExists(new LetterTemplate()); Assert.AreEqual(true, actual); }
public void IsLetterNameExistsTest() { // Arrange var mockLetterTemplateRepository = new Mock <ILetterTemplateRepository>(); mockLetterTemplateRepository.Setup(f => f.IsLetterNameExists(It.IsAny <LetterTemplate>())).Returns(true); LetterTemplateLogic target = new LetterTemplateLogic(mockLetterTemplateRepository.Object); //Act bool actual = target.IsLetterNameExists(null); //Assert Assert.AreEqual(true, actual); }
/// <summary> /// Determines whether [is letter name exists] [the specified letter template]. /// </summary> /// <param name="letterTemplate">The letter template.</param> /// <returns></returns> public bool IsLetterNameExists(LetterTemplate letterTemplate) { return(_letterTemplateLogic.IsLetterNameExists(letterTemplate)); }