public void WhenGivenStringArrayProperty_FormatsProperly()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromDictionaryProperty(StringsProperty, new Dictionary <string, string> {
                    { "t1", "v1" }, { "t2", "v2" }
                });

                Assert.AreEqual(actual.ToArray(), new string[] { "--strings \"t1=v1\"", "--strings \"t2=v2\"" });
            }
Ejemplo n.º 2
0
            public void WhenGivenStringArrayProperty_FormatsProperly()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromDictionaryProperty(
                    StringsProperty, new Dictionary <string, string> {
                    { "t1", "v1" }, { "t2", "v2" }
                }, isSecret: false);

                CollectionAssert.AreEqual(actual, new DockerArgument[] {
                    new DockerArgument("--strings", "t1=v1", DockerArgumentQuoting.Quoted),
                    new DockerArgument("--strings", "t2=v2", DockerArgumentQuoting.Quoted),
                });
            }
            public void WhenGivenNull_EmptyArrayReturned()
            {
                var actual = ArgumentsBuilderExtension.GetArgumentFromDictionaryProperty(StringsProperty, null);

                Assert.That(actual, Is.Empty);
            }