public static PavlovServer[] InitializePavlovServer(SshServerSerivce sshServerSerivce, PavlovServerService pavlovServerService) { var sshServer = SshServerServiceTests.SshServerInsert(sshServerSerivce); return(PavlovServers(sshServer, pavlovServerService)); }
public static PavlovServer[] PavlovServers(SshServer sshServer, PavlovServerService pavlovServerService) { pavlovServerService.Upsert(PavlovServer(sshServer), false); var pavlovServers = pavlovServerService.FindAll().GetAwaiter().GetResult(); return(pavlovServers); }
public PavlovServerController(SshServerSerivce service, UserService userService, PavlovServerService pavlovServerService, ServerBansService serverBansService, ServerSelectedMapService serverSelectedMapService, MapsService mapsService, SshServerSerivce sshServerSerivce, ServerSelectedWhitelistService whitelistService, SteamIdentityStatsServerService steamIdentityStatsServerService, ServerSelectedModsService serverSelectedModsService, SteamIdentityService steamIdentityService, UserManager <LiteDbUser> userManager, IToastifyService notyfService) { _notifyService = notyfService; _service = service; _userservice = userService; _pavlovServerService = pavlovServerService; _serverSelectedMapService = serverSelectedMapService; _serverBansService = serverBansService; _steamIdentityStatsServerService = steamIdentityStatsServerService; _mapsService = mapsService; _whitelistService = whitelistService; _steamIdentityService = steamIdentityService; _sshServerSerivce = sshServerSerivce; _serverSelectedModsService = serverSelectedModsService; UserManager = userManager; }
public SshServerServiceTests() { services = new ServicesBuilder(); _mocker = new AutoMocker(); services.Build(_mocker); _sshServerSerivce = _mocker.CreateInstance <SshServerSerivce>(); _pavlovServerService = _mocker.CreateInstance <PavlovServerService>(); }
public PublicViewListsController(PavlovServerPlayerHistoryService pavlovServerPlayerHistoryService, UserService userService, PavlovServerService pavlovServerService, PublicViewListsService publicViewListsService, MatchService matchService, MapsService mapsService) { _pavlovServerPlayerHistoryService = pavlovServerPlayerHistoryService; _userService = userService; _pavlovServerService = pavlovServerService; _publicViewListsService = publicViewListsService; _matchService = matchService; _mapsService = mapsService; }
public SshServerController(SshServerSerivce service, UserService userService, ServerSelectedMapService serverSelectedMapService, MapsService mapsService, PavlovServerService pavlovServerService, IConfiguration configuration) { _service = service; _userservice = userService; _serverSelectedMapService = serverSelectedMapService; _mapsService = mapsService; _pavlovServerService = pavlovServerService; _configuration = configuration; }
public PublicViewListsServiceTest() { services = new ServicesBuilder(); _mocker = new AutoMocker(); services.Build(_mocker); _pavlovServerService = _mocker.CreateInstance <PavlovServerService>(); _sshServerSerivce = _mocker.CreateInstance <SshServerSerivce>(); _pavlovServerInfoService = _mocker.CreateInstance <PavlovServerInfoService>(); _pavlovServerPlayerService = _mocker.CreateInstance <PavlovServerPlayerService>(); _publicViewListsService = _mocker.CreateInstance <PublicViewListsService>(); }
public ServerSelectedWhitelistServiceTests() { services = new ServicesBuilder(); _mocker = new AutoMocker(); services.Build(_mocker); _serverSelectedWhitelistService = _mocker.CreateInstance <ServerSelectedWhitelistService>(); _steamIdentityService = _mocker.CreateInstance <SteamIdentityService>(); _pavlovServerService = _mocker.CreateInstance <PavlovServerService>(); _sshServerSerivce = _mocker.CreateInstance <SshServerSerivce>(); _userManager = services.GetUserManager(); }
public MatchServiceTest() { services = new ServicesBuilder(); _mocker = new AutoMocker(); services.Build(_mocker); _pavlovServerService = _mocker.CreateInstance <PavlovServerService>(); _sshServerSerivce = _mocker.CreateInstance <SshServerSerivce>(); _teamService = _mocker.CreateInstance <TeamService>(); _matchService = _mocker.CreateInstance <MatchService>(); _steamIdentityService = _mocker.CreateInstance <SteamIdentityService>(); _matchSelectedSteamIdentitiesService = _mocker.CreateInstance <MatchSelectedSteamIdentitiesService>(); _matchSelectedTeamSteamIdentitiesService = _mocker.CreateInstance <MatchSelectedTeamSteamIdentitiesService>(); _userManager = services.GetUserManager(); }
private static PavlovServer[] InsertToPavlovServer(LiteDbUser user, SshServerSerivce sshServerSerivce, PavlovServerService pavlovServerService, ServerSelectedModsService serverSelectedModsService, bool withInsert = true) { var pavlovServers = PavlovServerServiceTests.InitializePavlovServer(sshServerSerivce, pavlovServerService); if (withInsert) { serverSelectedModsService.Insert(new ServerSelectedMods { LiteDbUser = user, PavlovServer = pavlovServers.First() }).GetAwaiter().GetResult(); } return(pavlovServers); }
public ApiWithKeyController(PavlovServerService pavlovServerService, SshServerSerivce sshServerSerivce, ReservedServersService reservedServersService, UserService userService, UserManager <LiteDbUser> userManager, IToastifyService notyfService, IConfiguration configuration) { _notifyService = notyfService; _pavlovServerService = pavlovServerService; _sshServerSerivce = sshServerSerivce; _userService = userService; _reservedServersService = reservedServersService; _configuration = configuration; _userManager = userManager; ApiKey = configuration.GetSection("ApiKey").Value; GeneratedServerPath = configuration.GetSection("GeneratedServerPath").Value; }
public RconController(RconService service, UserService userService, ServerSelectedMapService serverSelectedMapService, MapsService mapsService, PavlovServerService pavlovServerService, ServerBansService serverBansService, ServerSelectedModsService serverSelectedModsService, PavlovServerPlayerService pavlovServerPlayerService, IToastifyService itToastifyService) { _toastifyService = itToastifyService; _service = service; _userservice = userService; _serverSelectedMapService = serverSelectedMapService; _mapsService = mapsService; _pavlovServerService = pavlovServerService; _serverBansService = serverBansService; _pavlovServerPlayerService = pavlovServerPlayerService; _serverSelectedModsService = serverSelectedModsService; }
public MatchMakingController(UserService userService, MatchService matchService, PavlovServerService pavlovServerService, TeamService teamService, MatchSelectedSteamIdentitiesService matchSelectedSteamIdentities, SteamIdentityService steamIdentityService, MapsService mapsService, PublicViewListsService publicViewListsService, TeamSelectedSteamIdentityService teamSelectedSteamIdentityService, MatchSelectedTeamSteamIdentitiesService matchSelectedTeamSteamIdentitiesService) { _userservice = userService; _matchService = matchService; _pavlovServerService = pavlovServerService; _teamService = teamService; _steamIdentityService = steamIdentityService; _matchSelectedSteamIdentitiesService = matchSelectedSteamIdentities; _matchSelectedTeamSteamIdentitiesService = matchSelectedTeamSteamIdentitiesService; _teamSelectedSteamIdentityService = teamSelectedSteamIdentityService; _mapsService = mapsService; _publicViewListsService = publicViewListsService; }
public PavlovServerServiceTests() { services = new ServicesBuilder(); _mocker = new AutoMocker(); services.Build(_mocker); _userManager = services.GetUserManager(); // Mock ValidatePavlovServer function var tmpService = _mocker .Setup <PavlovServerService, Task <PavlovServer> >(x => x.ValidatePavlovServer(It.IsAny <PavlovServer>(), It.IsAny <bool>())) .ReturnsAsync((PavlovServer server, bool root) => server); _mocker.Use(tmpService); _pavlovServerService = _mocker.GetMock <PavlovServerService>().Object; _sshServerSerivce = _mocker.CreateInstance <SshServerSerivce>(); _serverSelectedModsService = _mocker.CreateInstance <ServerSelectedModsService>(); _steamIdentityService = _mocker.CreateInstance <SteamIdentityService>(); }
public AccountController( UserManager <LiteDbUser> userManager, SignInManager <LiteDbUser> signInManager, IEmailSender emailSender, ReservedServersService reservedServersService, SteamIdentityService steamIdentityService, PavlovServerService pavlovServerService, SshServerSerivce sshServerSerivce, ILogger <AccountController> logger, UserService userService) { _userManager = userManager; _signInManager = signInManager; _emailSender = emailSender; _logger = logger; _userService = userService; _sshServerSerivce = sshServerSerivce; _steamIdentityService = steamIdentityService; _reservedServersService = reservedServersService; _pavlovServerService = pavlovServerService; }
public LeaderBoardController(SteamIdentityStatsServerService steamIdentityStatsServerService, PavlovServerService pavlovServerService) { _steamIdentityStatsServerService = steamIdentityStatsServerService; _pavlovServerService = pavlovServerService; }