ex-int-02-meet-the-teacher/MeetTheTeacher.Test/Export/SpectreTableExporterTests.cs
github-classroom[bot] 1be1863b20
Initial commit
2025-04-24 07:02:41 +00:00

30 lines
883 B
C#

using MeetTheTeacher.Export;
using MeetTheTeacher.Model;
namespace MeetTheTeacher.Test.Export;
public sealed class SpectreTableExporterTests: ExporterTestBase
{
private readonly SpectreTableExporter _spectreTableExporter;
public SpectreTableExporterTests()
{
_spectreTableExporter = new SpectreTableExporter();
}
[Fact]
public void Export()
{
_spectreTableExporter.Export(SampleData, FileName);
var table = _spectreTableExporter.Table;
table.Should().NotBeNull();
table.Columns.Should().HaveCount(2);
table.Rows.Should().HaveCount(2);
// actual (string) values cannot be checked without reflection on an external library which will
// inevitably break and is a super bad idea, so we'll leave it at this
}
protected override string FileExtension => null!;
}