Пример #1
0
        public void WhenOrchestratingValidInput_ItShouldComposeNext()
        {
            inputValidator.Validate(ref instructions).ReturnsForAnyArgs((true, ""));
            _ = subject.Orchestrate(instructions);

            inputValidator.Received(1).Validate(ref instructions);
            composerFactory.Received(1).Build(instructions.Mode);
            // Check also composer.Received(1).Compose(instructions);
        }
Пример #2
0
        public Dictionary <string, string> Orchestrate(ComposeInstructions instructions)
        {
            var composition = new Dictionary <string, string>();

            var validation = inputValidator.Validate(ref instructions);

            if (!validation.isValid)
            {
                return(composition);
            }

            composer = composerFactory.Build(instructions.Mode);

            composition = composer.Compose(instructions);

            return(composition);
        }