public void array_serialization_for_all_recepients_serializes_all_properties_in_correct_order() { var message = new PublishMessage(topicUri, eventObj); var array = message.ToArray(); array.Length.Should().Be(3); array[0].Should().Be(MessageTypes.Publish); array[1].Should().Be(topicUri); array[2].Should().Be(eventObj); }
public void array_serialization_with_self_exclude_serializes_all_properties_in_correct_order() { var message = new PublishMessage(topicUri, eventObj, excludeSelf); var array = message.ToArray(); array.Length.Should().Be(4); array[0].Should().Be(MessageTypes.Publish); array[1].Should().Be(topicUri); array[2].Should().Be(eventObj); array[3].Should().Be(excludeSelf); }
public void array_serialization_with_excludes_serializes_all_properties_in_correct_order() { var message = new PublishMessage(topicUri, eventObj, excludes, null); var array = message.ToArray(); array.Length.Should().Be(4); array[0].Should().Be(MessageTypes.Publish); array[1].Should().Be(topicUri); array[2].Should().Be(eventObj); (array[3] as IEnumerable<string>).Should().BeEquivalentTo(excludes); }
public void parametrized_constructor_for_all_recepients_should_assign_all_parameters() { var message = new PublishMessage(topicUri, eventObj); message.TopicUri.Should().Be(topicUri); message.EventObject.Should().Be(eventObj); message.ExcludeSelf.Should().BeFalse(); message.Eligibles.Should().BeNull(); message.Excludes.Should().BeNull(); }
public void message_type_implements_IMessage_interface() { var message = new PublishMessage(); (message is IMessage).Should().BeTrue(); }
public void parametrized_constructor_with_self_exclude_should_assign_all_parameters() { var message = new PublishMessage(topicUri, eventObj, excludeSelf); message.TopicUri.Should().Be(topicUri); message.EventObject.Should().Be(eventObj); message.ExcludeSelf.Should().BeTrue(); message.Eligibles.Should().BeNull(); message.Excludes.Should().BeNull(); }
public void parametrized_constructor_with_excludes_and_eligibles_should_assign_all_parameters() { var message = new PublishMessage(topicUri, eventObj, excludes, eligibles); message.TopicUri.Should().Be(topicUri); message.EventObject.Should().Be(eventObj); message.ExcludeSelf.Should().BeFalse(); message.Eligibles.Should().BeEquivalentTo(eligibles); message.Excludes.Should().BeEquivalentTo(excludes); }