Skip to content

Commit

Permalink
updated subscription to only use type instead of version number in re…
Browse files Browse the repository at this point in the history
…sponse to Issue #28
  • Loading branch information
sbmako committed Oct 31, 2016
1 parent 460b172 commit f300c96
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion packaging/nuget/NServiceBus.MongoDB.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>NServiceBus.MongoDB</id>
<title>NServiceBus MongoDB</title>
<version>6.0.0</version>
<version>6.0.1</version>
<authors>Carlos Sandoval</authors>
<owners>SharkByte Software</owners>
<licenseUrl>https://github.com/sbmako/NServiceBus.MongoDB/blob/master/LICENSE</licenseUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public void SingleSubscriptionShouldOnlyCreateOneSubscription(

var subscription = subscriptions.First();
subscription.Id.TypeName.Should().Be(messageType.TypeName);
subscription.Id.Version.Should().Be(messageType.Version.ToString());
subscription.Subscribers.Should().HaveCount(1);

var firstSubscriber = subscription.Subscribers.First();
Expand All @@ -93,7 +92,6 @@ public void SameClientSubscribesTwiceShouldOnlyCreateOneSubscribtion(

var subscription = subscriptions.First();
subscription.Id.TypeName.Should().Be(messageType.TypeName);
subscription.Id.Version.Should().Be(messageType.Version.ToString());
subscription.Subscribers.Should().HaveCount(1);

var firstSubscriber = subscription.Subscribers.First();
Expand Down Expand Up @@ -122,15 +120,13 @@ public void SubscribeTwoMessageTypesShouldCreateTwoDifferentSubscriptions(

var subscription = subscriptions.First();
subscription.Id.TypeName.Should().Be(messageType1.TypeName);
subscription.Id.Version.Should().Be(messageType1.Version.ToString());
subscription.Subscribers.Should().HaveCount(1);

subscriptions = storage.GetSubscription(messageType2).Result.ToList();
subscriptions.Should().HaveCount(1);

subscription = subscriptions.First();
subscription.Id.TypeName.Should().Be(messageType2.TypeName);
subscription.Id.Version.Should().Be(messageType2.Version.ToString());
subscription.Subscribers.Should().HaveCount(1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ internal sealed class SubscriptionKey
public SubscriptionKey()
{
this.TypeName = string.Empty;
this.Version = string.Empty;
}

public SubscriptionKey(MessageType messagteType)
{
this.TypeName = messagteType.TypeName;
this.Version = messagteType.Version.ToString();
}

public string Version { get; set; }

public string TypeName { get; set; }
}
}

0 comments on commit f300c96

Please sign in to comment.