Esempio n. 1
0
 public void FieldDimensionsSetterThrowExeptionIfArgsIsOutOfRange()
 {
     MementoField mementoField = new MementoField();
     mementoField.FieldDimension = 11;
 }
Esempio n. 2
0
 public void ZeroBasedPlayfieldThrowsExecptionIfSetterAcceptNull()
 {
     MementoField mementoField = new MementoField();
     mementoField.ZeroBasedPlayField = null;
 }
Esempio n. 3
0
        public void SaveMethodCannotReturnMementoWithNullZeroBaseArray()
        {
            Playfield testField = Playfield.Instance;
            testField.SetFieldSize(5);
            testField.InitializeEmptyField();
            testField.PlaceMines();

            MementoField memento = new MementoField();
            memento = testField.SaveMemento();

            Assert.IsNotNull(memento.ZeroBasedPlayField, "Zero-based playfield backup cannot be null");
        }