public void FileStreamSelectCorrectStreamForASCIIPath() { var path = Path.Combine(PathToImages, "baboon.jpg"); using (var stream = SKFileStream.OpenStream(path)) { Assert.IsType <SKFileStream>(stream); } }
public void FileStreamSelectCorrectStreamForNonASCIIPath() { var path = Path.Combine(PathToImages, "上田雅美.jpg"); using (var stream = SKFileStream.OpenStream(path)) { Assert.IsType <SKFileStream>(stream); Assert.True(((SKFileStream)stream).IsValid); } }
public void FileStreamForMissingFile() { var path = Path.Combine(PathToImages, "missing-image.png"); Assert.Null(SKFileStream.OpenStream(path)); var stream = new SKFileStream(path); Assert.Equal(0, stream.Length); Assert.False(stream.IsValid); }
public void FileStreamSelectCorrectStreamForNonASCIIPath() { var path = Path.Combine(PathToImages, "上田雅美.jpg"); using (var stream = SKFileStream.OpenStream(path)) { if (IsWindows) { Assert.IsType <SKManagedStream>(stream); } else { Assert.IsType <SKFileStream>(stream); } } }