Example #1
0
        public void HandlePreclientProcessLaunchedTest()
        {
            const int processId = 13337;

            var process = CreateUntrackedMock <IProcess>();
            var preclientConfiguration = CreateUntrackedMock <TrinketSpawnConfiguration>();

            When(process.Id).ThenReturn(processId);
            When(leagueTrinketSpawnConfigurationFactory.GetPreclientConfiguration()).ThenReturn(preclientConfiguration);

            testObj.HandlePreclientProcessLaunched(process);

            Verify(leagueTrinketSpawnConfigurationFactory).GetPreclientConfiguration();
            Verify(trinketSpawner).SpawnTrinket(process, preclientConfiguration);
            VerifyNoMoreInteractions();
        }