public void Should_Throw_If_Context_Is_Null_For_Username_And_Password() { // Given ICakeContext context = null; // When Action action = () => OpenshiftAliases.OpenshiftLogin(context, "fake-username", "fake-password"); // Then action.Should().Throw <ArgumentNullException>() .Which.ParamName.Should().Be("context"); }
public void Should_Throw_If_Token_Is_Null_Or_Empty(string token) { // Given var context = Mock.Of <ICakeContext>(); // When Action action = () => OpenshiftAliases.OpenshiftLogin(context, token); // Then action.Should().Throw <ArgumentNullException>() .Which.ParamName.Should().Be("token"); }
public void Should_Throw_If_Password_Is_Null_Or_Empty(string password) { // Given var context = Mock.Of <ICakeContext>(); var username = "******"; // When Action action = () => OpenshiftAliases.OpenshiftLogin(context, username, password); // Then action.Should().Throw <ArgumentNullException>() .Which.ParamName.Should().Be("password"); }