Ejemplo n.º 1
0
        public void AddSecureStringOutput_ShouldAddStringOutputValueToOutputsPropertyAndSetIsSecureToTrue()
        {
            // Arrange
            var template = new TestTemplate();
            var key      = "key";
            var value    = "value";

            // Act
            template.AddSecureStringOutput(key, value);

            // Assert
            template.Outputs.Should().HaveCount(1);
            template.Outputs.First().Key.Should().Be(key);
            template.Outputs.First().Value.Should().BeOfType <StringOutputValue>();
            template.Outputs.First().Value.HasValue.Should().BeTrue();
            template.Outputs.First().Value.As <StringOutputValue>().IsObject.Should().BeFalse();
            template.Outputs.First().Value.As <StringOutputValue>().IsSecure.Should().BeTrue();
            template.Outputs.First().Value.As <StringOutputValue>().Value.Should().Be(value);
        }