Esempio n. 1
0
            public void Should_Throw_If_Package_Is_Null()
            {
                // Given
                var settings = new NpmRebuildSettings();

                // When
                var result = Record.Exception(() => settings.AddScopedPackage(null, "@bar"));

                // Then
                result.IsArgumentNullException("packageName");
            }
Esempio n. 2
0
            public void Should_Throw_If_Settings_Are_Null()
            {
                // Given
                NpmRebuildSettings settings = null;

                // When
                var result = Record.Exception(() => settings.AddScopedPackage("foo", "@bar"));

                // Then
                result.IsArgumentNullException("settings");
            }
Esempio n. 3
0
            public void Should_Throw_If_Scope_Does_Not_Start_With_At()
            {
                // Given
                var settings = new NpmRebuildSettings();

                // When
                var result = Record.Exception(() => settings.AddScopedPackage("foo", "bar"));

                // Then
                result.IsArgumentException("scope");
            }
Esempio n. 4
0
            public void Should_Add_Package_If_Scope_Is_WhiteSpace()
            {
                // Given
                var settings    = new NpmRebuildSettings();
                var packageName = "foo";
                var scope       = " ";

                // When
                settings.AddScopedPackage(packageName, scope);

                // Then
                settings.Packages.Count.ShouldBe(1);
                settings.Packages.ShouldContain(packageName);
            }