コード例 #1
0
        public void ThrowsWhenItemRemoved()
        {
            GameState     state    = Factory.DefaultGameState;
            EnemyResolver resolver = new EnemyResolver(state.Enemies[0], state);

            state = state.WithEnemies(null);
            resolver.Update(state);

            Assert.Throws <CharacterNotFoundException> (() => resolver.Item);
        }
コード例 #2
0
        public void ThrowsWhenReplacedWithAnother()
        {
            GameState     state    = Factory.DefaultGameState;
            EnemyResolver resolver = new EnemyResolver(state.Enemies[0], state);

            state = state.WithEnemies(Factory.Enemy.Yield());
            resolver.Update(state);

            Assert.Throws <CharacterNotFoundException> (() => resolver.Item);
        }