Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Tetris/TestTetris/TetrominoeParserTest.cs

27 lines
649 B
C#

using System;
using System.Drawing;
using NUnit.Framework;
using Tetris.Models;
namespace TestTetris;
public class TetrominoeParserTest {
[Test]
public void TestAll() {
bool[,] shape;
Tetrominoe t;
foreach (String name in TetrominoeParser.List()) {
Console.Out.WriteLine("====={"+name+"}=====");
Grid g = new Grid(new Color[10, 20]);
t = new Tetrominoe(g, name);
Console.Out.WriteLine(t);
}
}
[Test]
public void NotFound() {
Assert.Throws<Exception>(delegate {
TetrominoeParser.GetShape("azertyuiop");
});
}
}