Пример #1
0
    public void TestMethod1()
    {
        var tm = new TimerMock();

        var br = new Brick(0, 0);

        var prop = br.GetType().GetField("burn", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);

        prop.SetValue(br, new Animation(Const.BrickBurnAnimation, Const.BlockSize, new TimerMock()));

        br.Burn();
        tm.NextTick();
        tm.NextTick();
        tm.NextTick();
        tm.NextTick();
    }
Пример #2
0
        public void FromNotVisibleToGrow()
        {
            brick.State = BrickState.NotVisible;
            brickTimer.NextTick();

            Assert.AreEqual(BrickState.Grow, brick.State);
        }
Пример #3
0
        public void FromGrowToVisible()
        {
            brick.State = BrickState.Grow;
            growTimer.NextTick(frameQty);

            Assert.AreEqual(BrickState.Visible, brick.State);
        }
Пример #4
0
        public void FromBurnToNotVisible()
        {
            brick.State = BrickState.Burn;
            brick.Burn();
            burnTimer.NextTick(frameQty);

            Assert.AreEqual(BrickState.NotVisible, brick.State);
        }