mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
816 B
32 lines
816 B
// <copyright file="TestBase.cs" company="James Jackson-South">
|
|
// Copyright (c) James Jackson-South and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
// </copyright>
|
|
|
|
namespace ImageSharp.Tests
|
|
{
|
|
using System.IO;
|
|
|
|
/// <summary>
|
|
/// The test base class.
|
|
/// </summary>
|
|
public abstract class TestBase
|
|
{
|
|
protected string CreateOutputDirectory(string path, params string[] pathParts)
|
|
{
|
|
path = Path.Combine("TestOutput", path);
|
|
|
|
if (pathParts != null && pathParts.Length > 0)
|
|
{
|
|
path = Path.Combine(path, Path.Combine(pathParts));
|
|
}
|
|
|
|
if (!Directory.Exists(path))
|
|
{
|
|
Directory.CreateDirectory(path);
|
|
}
|
|
|
|
return path;
|
|
}
|
|
}
|
|
}
|