private void AssertDefinition(object source, bool expected, string[] show, IReadOnlyUserGroup[] groups) { ManifestContentAppDefinition definition = JsonConvert.DeserializeObject <ManifestContentAppDefinition>("{" + (show.Length == 0 ? string.Empty : " \"show\": [" + string.Join(",", show.Select(x => "\"" + x + "\"")) + "] ") + "}"); var factory = new ManifestContentAppFactory(definition, TestHelper.IOHelper); ContentApp app = factory.GetContentAppFor(source, groups); if (expected) { Assert.IsNotNull(app); } else { Assert.IsNull(app); } }
public ManifestContentAppFactory(ManifestContentAppDefinition definition, IIOHelper ioHelper) { _definition = definition; _ioHelper = ioHelper; }