Regroup Instantiation tests

This commit is contained in:
Marty Oehme 2018-08-30 10:17:31 +02:00
parent fb481669ed
commit eef7a23c8f
1 changed files with 38 additions and 34 deletions

View File

@ -30,6 +30,7 @@ void main() {
Grid sut = Grid(87, 85);
expect(sut.length, 7395);
}, tags: const ["happy"]);
group(".from", () {
test("copies the content of another grid on .from Constructor call", () {
Grid original = Grid(2, 2);
original[0] = "Hey";
@ -50,6 +51,8 @@ void main() {
Grid sut = Grid.from(original);
expect(sut.length, 4);
}, tags: const ["happy"]);
});
group(".fromList", () {
test("sets the length for list passed in on .fromList Constructor call",
() {
Grid sut = Grid.fromList(l, 3);
@ -70,6 +73,7 @@ void main() {
expect(sut.width, 3);
}, tags: const ["happy"]);
});
});
group("toIndex", () {
Grid sut;
setUp(() {