public void FileSystemProvider_CanFindExistingResource() { var provider = new FileSystemResourceProvider("Templates"); var resource = provider.Get("Template.tmpl"); Assert.IsNotNull(resource); Assert.IsTrue(resource.Length > 0); }
public void FileSystemProvider_CanFindLocalizedResource() { var provider = new FileSystemResourceProvider("Templates"); var resource = provider.Get("Template.tmpl", new CultureInfo("ru-RU")); Assert.IsNotNull(resource); using (var streamReader = new StreamReader(resource)) { var templateString = streamReader.ReadToEnd(); Assert.IsTrue(templateString.Contains("русском")); } }
public void FileSystemProvider_ThrowsResourceNotFoundException_WhenResourceIsNotFound() { var provider = new FileSystemResourceProvider("Templates"); var resource = provider.Get("TemplateNotFound.tmpl", new CultureInfo("en")); }