Beispiel #1
0
    public void Setup()
    {
        mockCharacterManager   = new Mock <CharacterManager>();
        mockStatManager        = new Mock <StatManager>();
        mockEnemyActionManager = new Mock <EnemyActionManager>();
        mockEnemyActionManager.Setup(enemyActionManager => enemyActionManager.Init(It.IsAny <RandomGenerator>()));
        mockCharacterManager.Setup(manager => manager.Init(mockStatManager.Object,
                                                           mockEnemyActionManager.Object));
        gameObject           = new GameObject();
        characterInitializer = gameObject.AddComponent <CharacterInitializer>();

        characterInitializer.Init(mockCharacterManager.Object,
                                  mockStatManager.Object,
                                  mockEnemyActionManager.Object);
    }