public void WhenGivenStringPropertyAndGivenParameter_FormatsProperly()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo",
                                                                                     parameter: new ParameterAttribute("-custom_name"));

                Assert.That(actual, Is.EqualTo("-custom_name=\"tubo\""));
            }
コード例 #2
0
            public void WhenGivenStringProperty_FormatsProperly()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo", isSecret: true).Value;

                Assert.That(actual.Key, Is.EqualTo("--string"));
                Assert.That(actual.Value, Is.EqualTo("tubo"));
                Assert.That(actual.Quoting, Is.EqualTo(DockerArgumentQuoting.QuotedSecret));
            }
コード例 #3
0
            public void WhenGivenNull_NullIsReturned()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, null);

                Assert.That(actual, Is.Null);
            }
コード例 #4
0
            public void WhenGivenStringProperty_FormatsProperly()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo");

                Assert.That(actual, Is.EqualTo("--string \"tubo\""));
            }
コード例 #5
0
            public void WhenGivenStringPropertyAndNoParameter_FormatsProperly()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromStringProperty(StringProperty, "tubo", parameter: null);

                Assert.That(actual, Is.EqualTo("/string=\"tubo\""));
            }