public void ResolvingStaticRoutesHandling() { RouteTable.Routes.Clear(); IWindsorContainer container = new WindsorContainer(); InitializeWindsor(ref container); AssemblyResourceProvider provider = new AssemblyResourceProvider(); string path = @"Data\Avatars\default.png"; string fp = Assembly.GetExecutingAssembly().CodeBase; fp = Path.GetDirectoryName(path); fp = Path.GetDirectoryName(path); fp = Path.GetDirectoryName(path); fp = Path.Combine(fp, path); try { if (provider.FileExists("/data/Avatar/default.png")) { provider.GetFile("/data/Avatar/default.png"); } } catch { Assert.Pass(); } Assert.Fail(); }
public void GetFile_should_return_virtual_file() { //arrange var provider = new AssemblyResourceProvider(); //act var result = provider.GetFile("~/Views/InputBuilders/String.aspx"); //assert Assert.IsNotNull(result); }
public void FilesInClientResourcesFolder_ShouldLoad(string path) { // Arrange var provider = new AssemblyResourceProvider(); // Act var result = provider.GetFile("~/EPiServer/Geta.Epi.FontThumbnail/ClientResources" + path); // Assert Assert.NotNull(result); }
public IResourceFile GetFile(string virtualPath) { var file = _assemblyResourceProvider.GetFile(virtualPath); return(new VirtualResourceFile(file)); }
public void ResolvingStaticRoutesHandling() { RouteTable.Routes.Clear(); IWindsorContainer container = new WindsorContainer(); InitializeWindsor(ref container); AssemblyResourceProvider provider = new AssemblyResourceProvider(); string path = @"Data\Avatars\default.png"; string fp = Assembly.GetExecutingAssembly().CodeBase; fp = Path.GetDirectoryName(path); fp = Path.GetDirectoryName(path); fp = Path.GetDirectoryName(path); fp = Path.Combine(fp, path); try { if (provider.FileExists("/data/Avatar/default.png")) { provider.GetFile("/data/Avatar/default.png"); } } catch { Assert.Pass(); } Assert.Fail(); }