public void ImmediateActivationModeIsParsed() { var obj = JObject.Parse("{ \"activation\": \"immediate\" }"); var manifest = new PackageConfiguration(null, obj); manifest.GetPackageActivationMode().Should().Be(EntityActivationMode.Immediate); }
public void DeferredActivationModeIsParsed() { var obj = JObject.Parse("{ \"activation\": \"deferred\" }"); var manifest = new PackageConfiguration(null, obj); manifest.GetPackageActivationMode().Should().Be(EntityActivationMode.Deferred); }
public void ActivationModeIsImmediateFoEmptyManifest() { var obj = JObject.Parse("{}"); var manifest = new PackageConfiguration(null, obj); manifest.GetPackageActivationMode().Should().Be(EntityActivationMode.Immediate); }
public void DisabledPackageStateIsParsed() { var obj = JObject.Parse("{ \"enabled\": \"false\" }"); var manifest = new PackageConfiguration(null, obj); manifest.IsPackageEnabled.Should().BeFalse(); }
public void PackageIsEnabledForEmptyManifest() { var obj = JObject.Parse("{}"); var manifest = new PackageConfiguration(null, obj); manifest.IsPackageEnabled.Should().BeTrue(); }
public void EmptyExtensibilityPointsListReturnForEmptyManifest() { var config = JObject.Parse("{}"); var manifest = new PackageConfiguration(null, config); var list = manifest.GetExtensibilityPoints(); list.Count().Should().Be(0); }
public void EmptyDeploymentHandlersListReturnForEmptyManifest() { var config = JObject.Parse("{}"); var manifest = new PackageConfiguration(null, config); var list = manifest.GetPackageDeploymentHandlers(); list.Count().Should().Be(0); }
public void ConfigWithThreeDeploymentHandlersParsed() { var config = JObject.Parse("{\"deploymentHandlers\": [\"1\",\"2\",\"3\"]}"); var manifest = new PackageConfiguration(null, config); var handlers = manifest.GetPackageDeploymentHandlers(); var handlersList = new List <DeploymentEventsHandlerInfo>(handlers); handlersList.Count.Should().Be(3); handlersList[0].ClassName.Should().Be("1"); handlersList[1].ClassName.Should().Be("2"); handlersList[2].ClassName.Should().Be("3"); }
public void ConfigWithOneExtensibilityPointParsed() { var config = JObject.Parse("{ \"extensibilityPoints\": [ {\"id\" : \"id\", \"activation\": \"deferred\", \"class\": \"test\", \"configuration\": {\"var\" : \"hello\"} } ] }"); var manifest = new PackageConfiguration(null, config); var extensions = manifest.GetExtensibilityPoints(); var extensionList = new List <ExtensibilityPointInfo>(extensions); extensionList.Count.Should().Be(1); extensionList[0].Id.Should().Be("id"); extensionList[0].ActivationMode.Should().Be(EntityActivationMode.Deferred); extensionList[0].ClassName.Should().Be("test"); var customConfig = extensionList[0].CustomConfiguration.Get(); customConfig.HasChildren().Should().BeTrue(); customConfig.GetChild("var").Value.Should().Be("hello"); }