コード例 #1
0
        public void ConventionalSendPortNameCanBeReferencedInSubscriptionFilter()
        {
            var sendPort = new SampleApplication().UnitTestSendPort;
            var filter   = new Filter(() => BtsProperties.SendPortName == sendPort.Name);

            Assert.That(
                filter.ToString(),
                Is.EqualTo(
                    string.Format(
                        "<Filter><Group><Statement Property=\"{0}\" Operator=\"{1}\" Value=\"{2}\" /></Group></Filter>",
                        BtsProperties.SendPortName.Type.FullName,
                        (int)FilterOperator.Equals,
                        ((ISupportNamingConvention)sendPort).Name)));
        }
コード例 #2
0
        public void ConventionalApplicationBindingSupportsBindingGeneration()
        {
            Skip.IfNot(BizTalkServerGroup.IsConfigured);

            using (new DeploymentContextInjectionScope(targetEnvironment: "ANYWHERE"))
            {
                var applicationBindingSerializer = new SampleApplication().GetApplicationBindingInfoSerializer();

                var binding = applicationBindingSerializer.Serialize();

                XDocument.Parse(binding).Should().BeEquivalentTo(
                    ResourceManager.Load(
                        Assembly.GetExecutingAssembly(),
                        "Be.Stateless.BizTalk.Resources.Simple.Application.Bindings.xml",
                        XDocument.Load));
            }
        }
コード例 #3
0
        public void ConventionalStandaloneReceivePortNameCanBeReferencedInSubscriptionFilter()
        {
            Skip.IfNot(BizTalkServerGroup.IsConfigured);
            using (new DeploymentContextInjectionScope(targetEnvironment: "ANYWHERE"))
            {
                var receivePort = new SampleApplication().ReceivePorts.Find <StandaloneReceivePort>();
                var filter      = new Filter(() => BtsProperties.ReceivePortName == receivePort.Name);

                filter.ToString().Should().Be(
                    string.Format(
                        CultureInfo.InvariantCulture,
                        "<Filter><Group><Statement Property=\"{0}\" Operator=\"{1}\" Value=\"{2}\" /></Group></Filter>",
                        BtsProperties.ReceivePortName.Type.FullName,
                        (int)FilterOperator.Equals,
                        receivePort.ResolveName()));
            }
        }