Beispiel #1
0
        public void Parse_Path()
        {
            var path    = "c61531b5.2512be3b.bb1214f7.a21bd1fd.js.v1";
            var options = new SmidgeOptions {
                UrlOptions = new UrlManagerOptions {
                    CompositeFilePath = "sg"
                }
            };
            var manager = new DefaultUrlManager(
                Mock.Of <IOptions <SmidgeOptions> >(x => x.Value == options),
                Mock.Of <IHasher>(),
                Mock.Of <IRequestHelper>());

            var result = manager.ParsePath(path);

            Assert.Equal("1", result.Version);
            Assert.Equal(4, result.Names.Count());
            Assert.Equal(WebFileType.Js, result.WebType);
        }