public void RemoveCellblockTest() { Cellblock cellblock = new Cellblock("TestBlock"); Cell cell = new Cell(4, 4, cellblock); cell.CellBlock = null; Assert.AreEqual(null, cell.CellBlock); }
public void Add(int maxPop, int pop, Cellblock cellblock) { LoadCellsFromDatabase(); Cell cell = new Cell(maxPop, pop, cellblock); using (ISession session = NhibernateService.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { session.Save(cell); transaction.Commit(); } } LoadCellsFromDatabase(); Notify(); }
public void AddCellblockTest() { Cellblock cellblock = new Cellblock("TestBlock"); Cell cell = new Cell(4, 4, cellblock); Assert.AreEqual("TestBlock", cell.CellBlock.Name); }
public Cell(int maxpop, int pop, Cellblock cellblock) { this.MaxPop = maxpop; this.Pop = pop; this.CellBlock = cellblock; }
public void AddCellblock(string name) { LoadCellsFromDatabase(); Cellblock cb = new Cellblock(name); using (ISession session = NhibernateService.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { session.Save(cb); transaction.Commit(); } } LoadCellsFromDatabase(); Notify(); }