Exemple #1
0
        private IAssemblyCollection ThatOrWhich(string word)
        {
            PredicateString.Add(word);
            var assemblies     = _assemblyCollector.Get();
            var assemblyFilter = new FilteredAssemblies(assemblies);
            var result         = new AssemblyCollection(assemblyFilter, _negate);

            return(_not ? result.Not() : result);
        }
        private AssemblyRule CreateSystemUnderTest()
        {
            CreateSampleAssemblies();
            var verifierMock = new Mock <IAssertionVerifier <IAssemblyInfo> >(MockBehavior.Loose);

            verifierMock.Setup(v => v.AppendCondition(It.IsAny <Predicate <IAssemblyInfo> >())).Callback <Predicate <IAssemblyInfo> >(p => _savedPredicate = p);
            var filter = new FilteredAssemblies(new [] { _mockAssembly1.Object, _mockAssembly2.Object });

            verifierMock.SetupGet(v => v.Items).Returns(filter);
            var sut = new AssemblyRule(verifierMock.Object);

            return(sut);
        }