Esempio n. 1
0
    public void Register_SimpleType_ShouldRegisterAsAMessage()
    {
        // Arrange
        MessageRegistry messageRegistry = new MessageRegistry();

        // Act
        messageRegistry.Register(typeof(FakeCommand));
        messageRegistry.Register(typeof(FakeCommand));
        messageRegistry.Register(typeof(int));

        // Assert
        messageRegistry.Should().HaveCount(1);
        messageRegistry.Single().MessageType.Should().Be(typeof(FakeCommand));
    }