Files
Rozpisky/Rozpisky.Tests/TestData.cs
T
marekandClaude Opus 5 a6377ab583 Baseline: současný stav projektu Rozpisky
První commit — WPF aplikace pro generování výkresových rohových razítek
(.NET 10, SkiaSharp, ACadSharp, ClosedXML) včetně xUnit testů, DXF šablony,
log a dokumentace. Build výstupy (bin/, obj/, .vs/) jsou ignorovány.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 09:45:49 +02:00

32 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.IO;
namespace Rozpisky.Tests;
/// <summary>Cesty k testovacím datům (loga DXF dodávaná s programem).</summary>
public static class TestData
{
/// <summary>Kořen repozitáře nalezen od bin složky testů směrem nahoru podle Rozpisky.sln.</summary>
public static string RepoRoot { get; } = NajdiKoren();
/// <summary>Plná cesta k logu ve zdrojové složce <c>Rozpisky\loga</c>.</summary>
public static string Logo(string fileName) => Path.Combine(RepoRoot, "Rozpisky", "loga", fileName);
/// <summary>Všech 9 log dodávaných s programem.</summary>
public static readonly string[] VsechnaLoga =
{
"eu_op_doprava.dxf", "md_sfdi.dxf", "sprava_zeleznic.dxf", "exprojekt.dxf",
"signalprojekt.dxf", "tesia.dxf", "mco.dxf", "exprojekt+mco.dxf", "sudopBrno.dxf",
};
private static string NajdiKoren()
{
var dir = new DirectoryInfo(AppContext.BaseDirectory);
while (dir is not null)
{
if (File.Exists(Path.Combine(dir.FullName, "Rozpisky.sln"))) return dir.FullName;
dir = dir.Parent!;
}
throw new InvalidOperationException("Rozpisky.sln nenalezen nad " + AppContext.BaseDirectory);
}
}