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)); } }
/// <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); }
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); }