public void ClaimedCapabilityMustBelongToSolution_Valid_Succeeds()
        {
            var validator = new SolutionsExValidator(_context.Object, _logger.Object, _solutionsValidator.Object);
            var soln      = Creator.GetSolutionEx();

            soln.ClaimedCapability = new List <CapabilitiesImplemented>
                                     (
                new []
            {
                Creator.GetCapabilitiesImplemented(solnId: soln.Solution.Id),
                Creator.GetCapabilitiesImplemented(solnId: soln.Solution.Id),
                Creator.GetCapabilitiesImplemented(solnId: soln.Solution.Id)
            }
                                     );

            validator.ClaimedCapabilityMustBelongToSolution();
            var valres = validator.Validate(soln);

            valres.Errors.Should().BeEmpty();
        }
        public void ClaimedCapabilityMustBelongToSolution_Invalid_ReturnsError()
        {
            var validator = new SolutionsExValidator(_context.Object, _logger.Object, _solutionsValidator.Object);
            var soln      = Creator.GetSolutionEx();

            soln.ClaimedCapability = new List <CapabilitiesImplemented>
                                     (
                new []
            {
                Creator.GetCapabilitiesImplemented(),
                Creator.GetCapabilitiesImplemented(),
                Creator.GetCapabilitiesImplemented()
            }
                                     );

            validator.ClaimedCapabilityMustBelongToSolution();
            var valres = validator.Validate(soln);

            valres.Errors.Should()
            .Contain(x => x.ErrorMessage == "ClaimedCapability must belong to solution")
            .And
            .HaveCount(1);
        }