예제 #1
0
        public void RequiesBuildCreatesMSBuildDeployer()
        {
            var environment = new Mock <IEnvironment>();

            environment.Setup(m => m.RequiresBuild).Returns(true);
            var deployerFactory = new DeployerFactory(environment.Object);

            IDeployer deployer = deployerFactory.CreateDeployer();

            Assert.IsType(typeof(MSBuildDeployer), deployer);
        }
예제 #2
0
        public void WhenRequiesBuildFalseCreatesBasicDeployer()
        {
            var environment = new Mock <IEnvironment>();

            environment.Setup(m => m.RequiresBuild).Returns(false);
            var deployerFactory = new DeployerFactory(environment.Object);

            IDeployer deployer = deployerFactory.CreateDeployer();

            Assert.IsType(typeof(BasicDeployer), deployer);
        }