コード例 #1
0
        public void VeryComplexThingIsValidAfterConstruction(string url, ExecutionMode mode, bool flag, int retries)
        {
            var thing = new VeryComplexThing(flag, retries);

            thing.TheMethod(url, mode);
            Assert.True(thing.ValidateInternalState());
        }
コード例 #2
0
        public void VeryComplexThingIsValidAfterConstruction(string url, ExecutionMode mode, bool flag, int retries)
        {
            // Since it's invalid to call the method in fast mode when the flag is false,
            // assume that case away.

            Assume.That(flag || mode != ExecutionMode.Fast);

            var thing = new VeryComplexThing(flag, retries);

            Assert.That(() => thing.TheMethod(url, mode), Throws.Nothing);
        }