Пример #1
0
            public void Should_Throw_If_Key_Is_WhiteSpace()
            {
                // Given
                var settings = new NpmSetSettings();

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

                // Then
                result.IsArgumentNullException("key");
            }
Пример #2
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                NpmSetSettings settings = null;

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

                // Then
                result.IsArgumentNullException("settings");
            }
Пример #3
0
            public void Should_Set_Key()
            {
                // Given
                var settings = new NpmSetSettings();
                var key      = "foo";

                // When
                settings.ForKey(key);

                // Then
                settings.Key.ShouldBe(key);
            }