public void TestMoreThanOneTable() { SimpleFixture fixture = new SimpleFixture(); fixture.LoadData("|some|\n|column|\n|50|\n\n|other table|\n|other|\n|45|\n\n"); Table table = fixture.GetTable("some"); Table otherTable = fixture.GetTable("other table"); Assert.AreEqual(2, fixture.TablesCount()); Assert.AreEqual(1, table.RowsCount()); Assert.AreEqual(1, otherTable.RowsCount()); }
public void TestShouldReadExampleFromString() { SimpleFixture fixture = new SimpleFixture(); fixture.LoadData("|some|\n|column|\n|50|\n\n"); Table table = fixture.GetTable("some"); Assert.AreEqual(1, table.RowsCount()); }
public void TestGetTableShouldThrowIfThereIsMoreThanOneTableWithTheSameName() { SimpleFixture fixture = new SimpleFixture(); fixture.LoadData("|TableWithArgs|someArg|\n|field1|field2|\n|1.74|73|\n\n|TableWithArgs|otherArg|\n|field1|field2|\n|474|21|\n\n"); try { fixture.GetTable("TableWithArgs"); Assert.Fail("should throw an exception here"); } catch (Exception e) {} }