public void testOK(string tst) { PloppableRICO.PloppableRICODefinition ricoDef = null; try { ricoDef = PloppableRICO.RICOReader.ParseRICODefinition(tst, String.Format(testDirectoryTmpl, tst)); if (ricoDef != null) { Console.WriteLine(ricoDef.Buildings.Count); } } catch (Exception ex) { Console.WriteLine("!! Unexpected Exception1: " + ex.Message + " !!"); Assert.True(false); } if (ricoDef == null) { Assert.True(false); } else { foreach (var s in ricoDef.errors) { Console.WriteLine("!" + s); } Assert.True(ricoDef.errors.Count == 0); } }
public void testDirtiness1() { PloppableRICO.PloppableRICODefinition ricoDef = null; try { ricoDef = PloppableRICO.RICOReader.ParseRICODefinition("ok", String.Format(testDirectoryTmpl, "ok"), true); } catch (Exception ex) { Console.WriteLine("!! Unexpected Exception2: " + ex.Message + " !!"); Assert.True(false); } Assert.True(!ricoDef.isDirty); }
public void testFatalities(string tst) { PloppableRICO.PloppableRICODefinition ricoDef = null; try { ricoDef = PloppableRICO.RICOReader.ParseRICODefinition(tst, String.Format(testDirectoryTmpl, tst), true); } catch (Exception ex) { Console.WriteLine("!! Unexpected Exception2: " + ex.Message + " !!"); Assert.True(false); } Assert.True(PloppableRICO.RICOReader.LastErrors.Count > 0 || ricoDef.errors.Count > 0); }