public void Should_Proxy_Call_To_SvnClient() { // Given var fixture = new SvnCheckouterFixture(); // When fixture.Checkout(); // Then fixture.SvnClient.Received(1).Checkout(fixture.From.ToString(), fixture.To.ToString(), fixture.Settings); }
public void Should_Throw_If_Settings_Is_Null() { // Given var fixture = new SvnCheckouterFixture { Settings = null }; // When // Then Assert.Throws <ArgumentNullException>("settings", () => fixture.Checkout()); }
public void Should_Throw_If_Revision_Less_Than_Zero() { // Given var fixture = new SvnCheckouterFixture { Settings = new SvnCheckoutSettings { Revision = -1 } }; // When // Then Assert.Throws <ArgumentException>("settings", () => fixture.Checkout()); }
public void Should_Not_Force_Credentials_If_Null() { // Given var fixture = new SvnCheckouterFixture { Settings = new SvnCheckoutSettings { Credentials = null } }; // When fixture.Checkout(); // Then fixture.SvnClient.DidNotReceive().ForceCredentials(Arg.Any <SvnCredentials>()); }
public void Should_Force_Credentials_If_Not_Null() { // Given var credentials = new SvnCredentials { Username = "******", Password = "******" }; var fixture = new SvnCheckouterFixture { Settings = new SvnCheckoutSettings { Credentials = credentials } }; // When fixture.Checkout(); // Then fixture.SvnClient.Received(1).ForceCredentials(credentials); }