Example #1
0
            public void Should_Throw_If_NuGet_Executable_Was_Not_Found()
            {
                // Given
                var fixture = new NuGetRestorerFixture();

                fixture.GivenDefaultToolDoNotExist();

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsCakeException(result, "NuGet: Could not locate executable.");
            }
Example #2
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                var fixture = new NuGetRestorerFixture();

                fixture.Settings = null;
                fixture.GivenDefaultToolDoNotExist();

                // When
                var result = Record.Exception(() => fixture.Run());

                // Then
                Assert.IsArgumentNullException(result, "settings");
            }