Exemplo n.º 1
0
 public DefusingState(IDefusingTime defusingTime, IDefusingTimerUpdatedListener defusingTimerUpdatedListener,
                      IDefuseFailedListener defuseFailedListener)
 {
     _defuseFailedListener         = defuseFailedListener;
     _defusingTimerUpdatedListener = defusingTimerUpdatedListener;
     _defusingTime  = defusingTime;
     NbBombsDefused = 0;
 }
Exemplo n.º 2
0
        public void Init()
        {
            _defusingTime = Substitute.For <IDefusingTime>();
            _defusingTimerUpdatedListener = Substitute.For <IDefusingTimerUpdatedListener>();
            _defuseFailedListener         = Substitute.For <IDefuseFailedListener>();

            _currentDefuseAttempt = Substitute.For <DefuseAttempt>(
                Substitute.For <IRandom>(),
                new DefuserCounter(),
                Substitute.For <AllBombs>(
                    Substitute.For <IRandom>(),
                    new IBomb[0],
                    Substitute.For <IDeviceInfo>()),
                new List <Player>().AsReadOnly(),
                0
                );

            var allPlayers = Substitute.For <AllPlayers>();

            allPlayers.GetAll().Returns(new ReadOnlyCollection <Player>(new List <Player>()));

            _defusingState = new DefusingState(_defusingTime, _defusingTimerUpdatedListener, _defuseFailedListener);
        }