コード例 #1
0
            public void Should_Throw_If_BuildConfig_Is_Null_Or_Empty(string buildConfig)
            {
                // Given
                var context = Mock.Of <ICakeContext>();

                // When
                Action action = () => OpenshiftAliases.OpenshiftStartBuild(context, buildConfig);

                // Then
                action.Should().Throw <ArgumentNullException>()
                .Which.ParamName.Should().Be("buildConfig");
            }
コード例 #2
0
            public void Should_Throw_If_Settings_Is_Null()
            {
                // Given
                var context = Mock.Of <ICakeContext>();

                // When
                Action action = () => OpenshiftAliases.OpenshiftStartBuild(context, "fake", null);

                // Then
                action.Should().Throw <ArgumentNullException>()
                .Which.ParamName.Should().Be("settings");
            }
コード例 #3
0
            public void Should_Throw_If_Context_Is_Null()
            {
                // Given
                ICakeContext context = null;

                // When
                Action action = () => OpenshiftAliases.OpenshiftStartBuild(context, "fake");

                // Then
                action.Should().Throw <ArgumentNullException>()
                .Which.ParamName.Should().Be("context");
            }