ScoreTests Init Method Delta Engine Documentation

Namespace: Breakout.Tests
Assembly: Breakout.Tests (in Breakout.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void Init()
Examples

[Test]
public void NextLevelWithoutInitialization()
{
    bool isGameOver = false;
    score.GameOver += () => isGameOver = true;
    Assert.AreEqual(1, score.Level);
    score.NextLevel();
    Assert.AreEqual(2, score.Level);
    Assert.IsFalse(isGameOver);
}
[Test]
public void NextLevelWithLevelInitialization()
{
    Resolve<Level>();
    bool isGameOver = false;
    score.GameOver += () => isGameOver = true;
    Assert.AreEqual(1, score.Level);
    score.NextLevel();
    Assert.AreEqual(2, score.Level);
    Assert.IsFalse(isGameOver);
}
See Also