Exemplo n.º 1
0
        public void Should_Throw_If_Token_Is_Null()
        {
            // Given
            var context = Substitute.For <ICakeContext>();

            // When
            var result = Record.Exception(() => NetlifyAliases.NetlifyDeploy(
                                              context, "my-site-id", null));

            // Then
            result.Should().BeOfType <ArgumentNullException>().Subject.ParamName.Should().Equals("token");
        }
Exemplo n.º 2
0
        public void Should_Throw_If_Context_Is_Null()
        {
            // Given
            var fixture = new NetlifyDeployFixture();

            // When
            var result = Record.Exception(() => NetlifyAliases.NetlifyDeploy(
                                              null, fixture.DirectoryToDeploy, fixture.Settings));

            // Then
            result.Should().BeOfType <ArgumentNullException>().Subject.ParamName.Should().Equals("context");
        }
        public void Should_Throw_If_Site_Id_Is_Null()
        {
            // Given
            var context = Substitute.For <ICakeContext>();

            // When
            var result = Record.Exception(() => NetlifyAliases.NetlifyDeploy(
                                              context, null, "my-token"));

            // Then
            result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("siteId");
        }
Exemplo n.º 4
0
        public void Should_Throw_If_Directory_To_Deploy_Is_Null()
        {
            // Given
            var fixture = new NetlifyDeployFixture();
            var context = Substitute.For <ICakeContext>();

            // When
            var result = Record.Exception(() => NetlifyAliases.NetlifyDeploy(
                                              context, null, fixture.Settings));

            // Then
            result.Should().BeOfType <ArgumentNullException>().Subject.ParamName.Should().Equals("directoryToDeploy");
        }