Exemplo n.º 1
0
            public void should_add_info_objects_registered_by_alias_when_present()
            {
                var metadata2 = new Custom2MetaData();
                var metadatas = new IWorkflowObjectMetadata[] { metadata2 };
                var logger    = MockRepository.GenerateMock <ILogger>();

                ClarifyApplicationFactory.RegisterWorkflowMetadata(metadatas, logger);

                WorkflowObjectInfo.GetObjectInfo(metadata2.Alias).ShouldBeTheSameAs(metadata2.Register());
            }
Exemplo n.º 2
0
            public void should_add_info_objects_returned_by_register()
            {
                var metadata1 = new Custom1MetaData();
                var metadatas = new IWorkflowObjectMetadata[] { metadata1 };
                var logger    = MockRepository.GenerateMock <ILogger>();

                ClarifyApplicationFactory.RegisterWorkflowMetadata(metadatas, logger);

                WorkflowObjectInfo.GetObjectInfo(metadata1.Register().ObjectName).ShouldBeTheSameAs(metadata1.Register());
            }
Exemplo n.º 3
0
            public void should_ignore_keys_not_starting_with_fchoice()
            {
                var source = new NameValueCollection {
                    { "fchoice.key1", "source" }
                };
                var target = new NameValueCollection {
                    { "dovetail.key2", "target" }, { "another.key2", "target" }
                };

                var result = ClarifyApplicationFactory.MergeSDKSettings(source, target);

                result.Count.ShouldEqual(1);
            }
Exemplo n.º 4
0
            public void should_not_modify_inputted_settings()
            {
                var source = new NameValueCollection {
                    { "fchoice.key1", "source" }
                };
                var target = new NameValueCollection {
                    { "fchoice.key2", "target" }
                };

                ClarifyApplicationFactory.MergeSDKSettings(source, target);

                source.Count.ShouldEqual(1);
                target.Count.ShouldEqual(1);
            }
Exemplo n.º 5
0
            public void should_not_override_existing_settings()
            {
                var source = new NameValueCollection {
                    { "fchoice.dbtype", "source-type" }
                };
                var target = new NameValueCollection {
                    { "fchoice.dbtype", "target-type" }
                };

                var result = ClarifyApplicationFactory.MergeSDKSettings(source, target);

                result.Count.ShouldEqual(1);
                result["fchoice.dbtype"].ShouldEqual("source-type");
            }
Exemplo n.º 6
0
            public void should_add_new_keys_to_result_settings()
            {
                var source = new NameValueCollection {
                    { "fchoice.key1", "source" }
                };
                var target = new NameValueCollection {
                    { "fchoice.key2", "target" }
                };

                var result = ClarifyApplicationFactory.MergeSDKSettings(source, target);

                result.Count.ShouldEqual(2);
                result["fchoice.key1"].ShouldEqual("source");
                result["fchoice.key2"].ShouldEqual("target");
            }
Exemplo n.º 7
0
            public void should_set_state_manager_timeout_using_database_settings()
            {
                ClarifyApplicationFactory.setSessionDefaultTimeout(_settings);

                StateManager.StateTimeout.ShouldEqual(TimeSpan.FromMinutes(_settings.SessionTimeoutInMinutes));
            }
Exemplo n.º 8
0
            public void should_contain_any_appsettings_starting_with_fchoice()
            {
                var configuration = ClarifyApplicationFactory.GetDovetailSDKConfiguration(_settings);

                configuration.Get("fchoice.test").ShouldNotBeNull();
            }