28 lines
649 B
C#
28 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");
|
|||
|
});
|
|||
|
}
|
|||
|
}
|