Exemple #1
0
        public void GetAppealTemplates()
        {
            Mock <IAppealLetterRepository> mockAppealLetterLogic = new Mock <IAppealLetterRepository>();
            List <LetterTemplate>          result = new List <LetterTemplate>();
            //int facilityId = 3;
            LetterTemplate templateinfo = new LetterTemplate {
                FacilityId = 3
            };

            mockAppealLetterLogic.Setup(f => f.GetAppealTemplates(templateinfo)).Returns(result);
            AppealLetterLogic target = new AppealLetterLogic(mockAppealLetterLogic.Object);

            List <LetterTemplate> actual = target.GetAppealTemplates(templateinfo);

            Assert.AreEqual(result, actual);
        }
Exemple #2
0
        public void GetAllLetterTemplatesWithoutPaginationTest()
        {
            // Arrange
            var mockAppealLetterRepository        = new Mock <IAppealLetterRepository>();
            List <LetterTemplate> letterTemplates = new List <LetterTemplate>
            {
                new LetterTemplate {
                    LetterTemplateId = 1, Name = "Test Letter 1", TemplateText = "Template Text 1"
                },
                new LetterTemplate {
                    LetterTemplateId = 2, Name = "Test Letter 2", TemplateText = "Template Text 2"
                }
            };

            mockAppealLetterRepository.Setup(f => f.GetAppealTemplates())
            .Returns(letterTemplates);
            AppealLetterLogic target = new AppealLetterLogic(mockAppealLetterRepository.Object);

            //Act
            List <LetterTemplate> actual = target.GetAppealTemplates();

            //Assert
            Assert.AreEqual(letterTemplates, actual);
        }
 public List <LetterTemplate> GetAppealTemplates(LetterTemplate appealLetterInfo)
 {
     return(_appealLetterLogic.GetAppealTemplates(appealLetterInfo));
 }