コード例 #1
0
        public void GetBuildLogReturnsUniqueInstanceTest()
        {
            var constructorResolver = Substitute.For<IConstructorResolver>();
            var creationRules = new List<CreationRule>();
            var typeCreators = new List<ITypeCreator>();
            var valueGenerators = new List<IValueGenerator>();
            var ignoreRules = new List<IgnoreRule>();
            var executeOrderRules = new List<ExecuteOrderRule>();
            var postBuildActions = new List<IPostBuildAction>();

            var target = new BuildStrategy(
                constructorResolver,
                creationRules,
                typeCreators,
                valueGenerators,
                ignoreRules,
                executeOrderRules,
                postBuildActions);

            var first = target.GetBuildLog();
            var second = target.GetBuildLog();

            first.Should().NotBeSameAs(second);
        }
コード例 #2
0
        public void GetBuildLogReturnsDefaultBuildLogTest()
        {
            var constructorResolver = Substitute.For<IConstructorResolver>();
            var creationRules = new List<CreationRule>();
            var typeCreators = new List<ITypeCreator>();
            var valueGenerators = new List<IValueGenerator>();
            var ignoreRules = new List<IgnoreRule>();
            var executeOrderRules = new List<ExecuteOrderRule>();
            var postBuildActions = new List<IPostBuildAction>();

            var target = new BuildStrategy(
                constructorResolver,
                creationRules,
                typeCreators,
                valueGenerators,
                ignoreRules,
                executeOrderRules,
                postBuildActions);

            var actual = target.GetBuildLog();

            actual.Should().BeOfType<DefaultBuildLog>();
        }