示例#1
0
            public void Should_Throw_If_Source_Is_WhiteSpace()
            {
                // Given
                var settings = new NpmPackSettings();

                // When
                var result = Record.Exception(() => settings.FromSource(" "));

                // Then
                result.IsArgumentNullException("source");
            }
示例#2
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                NpmPackSettings settings = null;

                // When
                var result = Record.Exception(() => settings.FromSource("foo"));

                // Then
                result.IsArgumentNullException("settings");
            }
示例#3
0
            public void Should_Set_Source()
            {
                // Given
                var settings = new NpmPackSettings();
                var source   = "foo";

                // When
                settings.FromSource(source);

                // Then
                settings.Source.ShouldBe(source);
            }