public void AddReferenceToSiblingFilenameInSubDirectory_ExpandsFilenameToAbsolutePath() { root.CreateSubdirectory("bundle\\sub"); File.WriteAllText(PathUtilities.Combine(root.FullName, "bundle", "sub", "another.js"), ""); var another = new FileAsset(StubFile(fullPath: "~/bundle/sub/another.js"), bundle); bundle.Assets.Add(another); asset.AddReference("sub\\another.js", 1); asset.References.First().ToPath.ShouldEqual("~/bundle/sub/another.js"); }
public Asset_Tests() { root = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString())); root.CreateSubdirectory("bundle"); bundle = new TestableBundle("~/bundle"); sourceFile = StubFile("asset content"); asset = new FileAsset(sourceFile, bundle); bundle.Assets.Add(asset); var another = new FileAsset(StubFile(fullPath: "~/bundle/another.js"), bundle); bundle.Assets.Add(another); }