コード例 #1
0
        public void Should_Throw_If_Settings_Are_Null()
        {
            SwitchFixture fixture = new SwitchFixture();

            fixture.Settings = null;

            Assert.Throws <ArgumentNullException>(() => fixture.Run());
        }
コード例 #2
0
        public void Should_Throw_If_ObjectSpec_Is_Null()
        {
            SwitchFixture fixture = new SwitchFixture();

            fixture.Settings = new PlasticSCMSwitchSettings()
            {
                ObjectSpec = null
            };

            Assert.Throws <ArgumentNullException>(() => fixture.Run());
        }
コード例 #3
0
        public void Should_Generate_All_Arguments()
        {
            var objectSpec = "cs:1234";

            SwitchFixture fixture = new SwitchFixture
            {
                Settings = new PlasticSCMSwitchSettings()
                {
                    ObjectSpec = objectSpec
                }
            };

            var result = fixture.Run();

            Assert.That(result.Args, Does.StartWith("switch"));
            Assert.That(result.Args, Does.Contain(objectSpec));
        }