Exemple #1
0
        public void StringBuilderExtensions_Actor_WithColor_Should_ContainActorLineWithColor()
        {
            // Assign
            var stringBuilder = new StringBuilder();

            // Act
            stringBuilder.Actor("actorA", color: "AliceBlue");

            // Assert
            stringBuilder.ToString().Should().Be("actor actorA #AliceBlue\n");
        }
Exemple #2
0
        public void StringBuilderExtensions_Actor_WithDisplayName_Should_ContainActorLineWithDisplayName()
        {
            // Assign
            var stringBuilder = new StringBuilder();

            // Act
            stringBuilder.Actor("actorA", displayName: "Actor A");

            // Assert
            stringBuilder.ToString().Should().Be("actor \"Actor A\" as actorA\n");
        }
Exemple #3
0
        public void StringBuilderExtensions_Actor_Should_ContainActorLine()
        {
            // Assign
            var stringBuilder = new StringBuilder();

            // Act
            stringBuilder.Actor("actorA");

            // Assert
            stringBuilder.ToString().Should().Be("actor actorA\n");
        }
Exemple #4
0
        public void StringBuilderExtensions_Actor_WithOrder_Should_ContainActorLineWithOrder()
        {
            // Assign
            var stringBuilder = new StringBuilder();

            // Act
            stringBuilder.Actor("actorA", order: 10);

            // Assert
            stringBuilder.ToString().Should().Be("actor actorA order 10\n");
        }
Exemple #5
0
        public void StringBuilderExtensions_Actor_WhitespaceName_Should_ThrowArgumentException()
        {
            // Assign
            var stringBuilder = new StringBuilder();

            // Act
            Action action = () => stringBuilder.Actor(" ");

            // Assert
            action.Should().Throw <ArgumentException>()
            .WithMessage("A non-empty value should be provided*")
            .And.ParamName.Should().Be("name");
        }