public void GetLetterTemplateById() { var mockLetterTemplateLogic = new Mock <ILetterTemplateRepository>(); LetterTemplate result = new LetterTemplate(); mockLetterTemplateLogic.Setup(f => f.GetLetterTemplateById(It.IsAny <LetterTemplate>())).Returns(result); LetterTemplateLogic target = new LetterTemplateLogic(mockLetterTemplateLogic.Object); LetterTemplate actual = target.GetLetterTemplateById(new LetterTemplate()); Assert.AreEqual(result, actual); }
public void GetLetterTemplateByIdTest() { // Arrange var mockLetterTemplateRepository = new Mock <ILetterTemplateRepository>(); LetterTemplate letterTemplateResult = new LetterTemplate(); mockLetterTemplateRepository.Setup(f => f.GetLetterTemplateById(It.IsAny <LetterTemplate>())).Returns(letterTemplateResult); LetterTemplateLogic target = new LetterTemplateLogic(mockLetterTemplateRepository.Object); //Act LetterTemplate actual = target.GetLetterTemplateById(null); //Assert Assert.AreEqual(letterTemplateResult, actual); }
public LetterTemplate Get(LetterTemplate letterTemplate) { return(_letterTemplateLogic.GetLetterTemplateById(letterTemplate)); }