Esempio n. 1
0
        public void GetAddressRelativeToNamespace_Slash_ReturnsSlash()
        {
            var helper = new ServiceBusHelper((m, a) => { });

            helper.NamespaceUri = new Uri("sb://aaa.test.com/");

            Assert.That(helper.GetAddressRelativeToNamespace("/"), Is.EqualTo("/"));
        }
Esempio n. 2
0
        public void GetAddressRelativeToNamespace_RelativeUriWithSingleSegmentAndTrailingSlash_ReturnsSegment()
        {
            var helper = new ServiceBusHelper((m, a) => { });

            helper.NamespaceUri = new Uri("sb://aaa.test.com/");

            Assert.That(helper.GetAddressRelativeToNamespace("name/"), Is.EqualTo("name/"));
        }
Esempio n. 3
0
        public void GetAddressRelativeToNamespace_AbsoluteUriNotUnderNamespace_ReturnsLastSegment()
        {
            var helper = new ServiceBusHelper((m, a) => { });

            helper.NamespaceUri = new Uri("sb://aaa.test.com/");

            Assert.That(helper.GetAddressRelativeToNamespace("sb://bbb.test.com/some/path/segments/name"), Is.EqualTo("name"));
        }
Esempio n. 4
0
        public void GetAddressRelativeToNamespace_RelativeUriWithMultipleSegmentsTrailingSlash_ReturnsLastSegmentWithTrailingSlash()
        {
            var helper = new ServiceBusHelper((m, a) => { });

            helper.NamespaceUri = new Uri("sb://aaa.test.com/");

            Assert.That(helper.GetAddressRelativeToNamespace("some/path/segments/name/"), Is.EqualTo("name/"));
        }
Esempio n. 5
0
        public void GetAddressRelativeToNamespace_AbsoluteUriUnderNamespaceTrailingSlash_ReturnsRelativePathWithTrailingSlash()
        {
            var helper = new ServiceBusHelper((m, a) => { });

            helper.NamespaceUri = new Uri("sb://aaa.test.com/");

            Assert.That(helper.GetAddressRelativeToNamespace("sb://aaa.test.com/some/path/segments/name/"), Is.EqualTo("some/path/segments/name/"));
        }