Exemple #1
0
        public void read_content()
        {
            var context = MockRepository.GenerateMock<IContentPipeline>();
            var file = new AssetFile("something.js"){
                FullPath = "some/path"
            };

            var theContents = "some contents";
            context.Stub(x => x.ReadContentsFrom(file.FullPath)).Return(theContents);

            var source = new FileRead(file);

            source.GetContent(context).ShouldEqual(theContents);
        }
Exemple #2
0
        public void read_content()
        {
            var context = MockRepository.GenerateMock <IContentPipeline>();
            var file    = new AssetFile("something.js")
            {
                FullPath = "some/path"
            };

            var theContents = "some contents";

            context.Stub(x => x.ReadContentsFrom(file.FullPath)).Return(theContents);

            var source = new FileRead(file);

            source.GetContent(context).ShouldEqual(theContents);
        }