public SubscriptionNameFor ( string applicationName, |
||
applicationName | string | |
handlerType | ||
return | string |
public void WhenCreatingASubscriptionForATypeASpaceShouldBeConvertedToTheSanitizeCharacter() { var pathFactory = new PathFactory(new GlobalPrefixSetting()); var subscriptionName = pathFactory.SubscriptionNameFor("My App", "App server", typeof(MyEventWithALongName)); subscriptionName.ShouldBe("my.app.app.server.myeventwithalongname"); }
public void WhenCreatingANameForAMulticastSubscriptionWithAGlobalPrefix_ThePathShouldNotStartWithThePrefix() { var pathFactory = new PathFactory(new GlobalPrefixSetting {Value = "testprefix"}); var subscriptionName = pathFactory.SubscriptionNameFor("My Application", "My Instance", typeof(SimpleEvent)); subscriptionName.ShouldBe("my.application.my.instance.simpleevent"); }
public void WhenCreatingASubscriptionForATypeWeHaveAMaximumLengthOf50() { var pathFactory = new PathFactory(new GlobalPrefixSetting()); var path = pathFactory.SubscriptionNameFor("MyLongApplicationName", "Appserver", typeof(MyEventWithALongName)); path.Length.ShouldBe(50); }