public void SaveLoadBarriersTest()
        {
            IBarrier b1 = new Barrier(new Coordinate(0, RoundBarriers.BOARD_DIMENSION / 2),
                                      BarrierOrientation.Horizontal, BarrierPiece.Head);
            IBarrier b2 = new Barrier(new Coordinate(1, RoundBarriers.BOARD_DIMENSION / 2),
                                      BarrierOrientation.Horizontal, BarrierPiece.Tail);

            IList <IBarrier> barriers = new List <IBarrier>()
            {
                b1, b2
            };

            foreach (var barrier in barriers)
            {
                this.rb.Add(barrier);
            }

            Assert.IsTrue(saver.Save(rb));
            Assert.IsTrue(loader.Load());
            Assert.IsTrue(loader.Barriers.Contains(b1));
            Assert.IsTrue(loader.Barriers.Contains(b2));
        }
Пример #2
0
 public void LoadBarrierTest()
 {
     Assert.IsTrue(save.Save());
     Assert.IsTrue(load.Load());
 }