public void Get_File() { const string testSnippet = @"this is just a test {0}"; var virtualPathId = CodeDelegateVirtualPath.GetOrCreateVirtualPathId("MyKey"); CodeDelegatesCollection.TryAdd(virtualPathId, (dp, vpi) => string.Format(testSnippet, dp)); var path = CodeDelegateVirtualPath.CreateFullPath(virtualPathId, "cs").TrimStart("~"); var provider = new CodeDelegateVirtualPathProvider(); var file = provider.GetFile(path); Assert.AreEqual(typeof(CodeDelegateVirtualFile), file.GetType()); }