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); }
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); }