Exemplo n.º 1
0
        public void CanGetIndexes()
        {
            var variableDictionary = new VariableDictionary
            {
                ["Octopus.Action[Package A].Name"] = "A",
                ["Octopus.Action[Package B].Name"] = "B",
                ["PackageBName"] = "#{Octopus.Action[Package B].Name}",
            };

            var presentIndexes = variableDictionary.GetIndexes("Octopus.Action");

            presentIndexes.Should().HaveCount(2);
            presentIndexes.Should().Contain("Package A");
            presentIndexes.Should().Contain("Package B");

            var absentIndexes = variableDictionary.GetIndexes("Foo.Bar");

            absentIndexes.Should().HaveCount(0);
        }