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("/")); }
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/")); }
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")); }
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/")); }
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/")); }