Example #1
0
        public async Task Load_Manifest_Json_Type_Test()
        {
            // Arrange
            Mock <ISiteManifestRepository> mockSiteManfiestRepository = new Mock <ISiteManifestRepository>();

            mockSiteManfiestRepository
            .Setup(a => a.GetSiteManifestsAsync(It.IsAny <IEnumerable <string> >(), It.IsAny <string>()))
            .Returns(Task.FromResult(new List <LetPortal.CMS.Core.Entities.SiteManifest>
            {
                new LetPortal.CMS.Core.Entities.SiteManifest
                {
                    Key = "CompanyLink",
                    ConfigurableValue = ConvertUtil.SerializeObject(new LinkModel {
                    }),
                    EditorType        = LetPortal.CMS.Core.Entities.ManifestEditorType.Textbox
                }
            }));
            ThemeProvider themeProvider = new ThemeProvider(mockSiteManfiestRepository.Object, null);
            // Act
            JsonModel result = await themeProvider.LoadAsync(new JsonModel(), "1");

            // Assert

            Assert.NotNull(result.CompanyLink);
        }