public void FindServer() { // arrange var pavlovServers = PavlovServerServiceTests.InitializePavlovServer(_sshServerSerivce, _pavlovServerService); CreatePavlovServerInfo(_pavlovServerInfoService, pavlovServers.First().Id); // act var serverInfoResult = _pavlovServerInfoService.FindServer(pavlovServers.First().Id).GetAwaiter().GetResult(); // assert serverInfoResult.Should().NotBeNull(); }
public static PavlovServerInfo CreatePavlovServerInfo(PavlovServerInfoService pavlovServerInfoService, int pavlovServerId) { pavlovServerInfoService.Upsert(new PavlovServerInfo { GameMode = "TDM", MapLabel = "test", MapPictureLink = "", PlayerCount = "test", RoundState = "test", ServerId = pavlovServerId, ServerName = "test", Teams = "1", Team0Score = "0", Team1Score = "0" }).GetAwaiter().GetResult(); return(pavlovServerInfoService.FindServer(pavlovServerId).GetAwaiter().GetResult()); }