Exemple #1
0
        public void WhenProcessCssReferenceWithoutTrailingSemicolon_ThenAssetAddReferenceIsCalled()
        {
            var bundle = new StylesheetBundle("~");
            var css    = "/* @reference \"test.css\" */";
            var asset  = AddCssAsset(bundle, css);

            var processor = new ParseCssReferences();

            processor.Process(bundle, new CassetteSettings(""));

            asset.Verify(a => a.AddReference("test.css", 1));
        }
Exemple #2
0
        public void WhenProcessSimpleCssReferenceWithSingleQuotes_ThenAssetAddReferenceIsCalled()
        {
            var bundle = new StylesheetBundle("~");
            var css    = "/* @reference 'test.css'; */";
            var asset  = AddCssAsset(bundle, css);

            var processor = new ParseCssReferences();

            processor.Process(bundle, new CassetteSettings(""));

            asset.Verify(a => a.AddReference("test.css", 1));
        }
        public void WhenProcessSimpleCssReference_ThenAssetAddReferenceIsCalled()
        {
            var bundle = new StylesheetBundle("~");
            var css    = "/* @reference \"test.css\"; */";
            var asset  = AddCssAsset(bundle, css);

            var processor = new ParseCssReferences();

            processor.Process(bundle);

            asset.Verify(a => a.AddReference("test.css", 1));
        }
Exemple #4
0
        public void WhenProcessTwoCssReferencesInDifferentComments_ThenAssetAddReferenceIsCalledTwice()
        {
            var bundle = new StylesheetBundle("~");
            var css    = "/* @reference \"test1.css\"; */\n/* @reference \"test2.css\"; */";
            var asset  = AddCssAsset(bundle, css);

            var processor = new ParseCssReferences();

            processor.Process(bundle, new CassetteSettings(""));

            asset.Verify(a => a.AddReference("test1.css", 1));
            asset.Verify(a => a.AddReference("test2.css", 2));
        }