コード例 #1
0
        public void GetRelativeFilesShouldParseBundleFile()
        {
            var fileReader = new Mock<IFileReader>();
            var appManager = new Mock<IAppManager>();

            var parser = new BundleParser(fileReader.Object, appManager.Object);

            var lines = new List<string>
            {
                "// ~/foo.js",
                "// ~/bar.js"
            };

            appManager.Setup(x => x.GetRootDirectory()).Returns(string.Empty);
            fileReader.Setup(x => x.ReadAllLines(It.IsAny<string>())).Returns(lines);
            var result = parser.GetRelativeFiles("");

            result.Should().ContainInOrder(new[] {"/foo.js", "/bar.js"});
        }
コード例 #2
0
 public BundleParserFixture()
 {
     _fileReader = new Mock<IFileReader>();
     _appManager = new Mock<IAppManager>();
     _bundleParser = new BundleParser(_fileReader.Object, _appManager.Object);
 }