Пример #1
0
            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");
            }
Пример #2
0
            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");
            }
Пример #3
0
            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");
            }