Example #1
0
        public void Similarity_Between0And100_SetsProperty()
        {
            var command = new AddRemoveCommand();

            for (int index = 0; index <= 100; index++)
            {
                command.Similarity = index;
                Assert.That(command.Similarity, Is.EqualTo(index));
            }
        }
        public void Similarity_Between0And100_SetsProperty()
        {
            var command = new AddRemoveCommand();

            for (int index = 0; index <= 100; index++)
            {
                command.Similarity = index;
                Assert.That(command.Similarity, Is.EqualTo(index));
            }
        }
Example #3
0
        /// <summary>
        /// Completely skip checks related to case-collision problems.
        /// </summary>
        /// <param name="command">
        /// The <see cref="AddRemoveCommand"/> to modify.
        /// </param>
        /// <returns>
        /// The specified <see cref="AddRemoveCommand"/> <paramref name="command"/> object, for the
        /// fluent interface.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        /// <para><paramref name="command"/> is <c>null</c>.</para>
        /// </exception>
        /// <exception cref="System.InvalidOperationException">
        /// The CaseGuard extension is not installed and active.
        /// </exception>
        public static AddRemoveCommand WithoutCaseGuarding(this AddRemoveCommand command)
        {
            if (command == null)
            {
                throw new ArgumentNullException("command");
            }
            if (!CaseGuardExtension.IsInstalled)
            {
                throw new InvalidOperationException("The caseguard extension is not installed and active");
            }

            command.AddArgument("--unguard");
            return(command);
        }
Example #4
0
        public void Similarity_BelowZero_ThrowsArgumentOutOfRangeException()
        {
            var command = new AddRemoveCommand();

            Assert.Throws <ArgumentOutOfRangeException>(() => command.Similarity = -1);
        }
        public void Similarity_BelowZero_ThrowsArgumentOutOfRangeException()
        {
            var command = new AddRemoveCommand();

            Assert.Throws<ArgumentOutOfRangeException>(() => command.Similarity = -1);
        }