public static void init(TestContext a) { DAL.CleanDB(); InterfaceLayer.registration("*****@*****.**", "aaaA1"); InterfaceLayer.login("aaa", "aaaA1"); InterfaceLayer.createBoard("board", Constants.InfiniteLimit, Constants.InfiniteLimit, Constants.InfiniteLimit, Constants.InfiniteLimit); }
public void TestBoardBadCreate() { try { InterfaceLayer.createBoard("test", 2, 2, 2, 1); Assert.Fail("managed to create bad board"); } catch (AlmogException e) { } catch (Exception e) { Assert.Fail("exception thrown during creation of bad board"); } try { Board b = new Board("test", Constants.InfiniteLimit, 1, 1, 5); Assert.Fail("managed to create bad board"); } catch (AlmogException e) { Assert.AreEqual((String)e.Value, "Limits problem"); } catch (Exception e) { Assert.Fail("exception thrown during creation of bad board"); } }