public async Task FleetAsync_successfully_returns_a_Fleet() { Mock <IWebClient> mockedWebClient = new Mock <IWebClient>(); int characterId = 828658; string characterName = "ThisIsACharacter"; FleetScopes scopes = FleetScopes.esi_fleets_read_fleet_v1; SsoToken inputToken = new SsoToken { AccessToken = "This is a old access token", RefreshToken = "This is a old refresh token", CharacterId = characterId, CharacterName = characterName, FleetScopesFlags = scopes }; string json = "{\"is_free_move\": false,\"is_registered\": false,\"is_voice_enabled\": false,\"motd\": \"This is an <b>awesome</b> fleet!\"}"; mockedWebClient.Setup(x => x.GetAsync(It.IsAny <WebHeaderCollection>(), It.IsAny <string>(), It.IsAny <int>())).ReturnsAsync(new EsiModel { Model = json }); InternalLatestFleets internalLatestFleets = new InternalLatestFleets(mockedWebClient.Object, string.Empty); V1Fleet model = await internalLatestFleets.FleetAsync(inputToken, long.MinValue); Assert.False(model.IsFreeMove); Assert.False(model.IsRegistered); Assert.False(model.IsVoiceEnabled); }
public async Task FleetAsync_successfully_returns_a_Fleet() { int characterId = 828658; string characterName = "ThisIsACharacter"; FleetScopes scopes = FleetScopes.esi_fleets_read_fleet_v1; SsoToken inputToken = new SsoToken { AccessToken = "This is a old access token", RefreshToken = "This is a old refresh token", CharacterId = characterId, CharacterName = characterName, FleetScopesFlags = scopes }; LatestFleetsEndpoints internalLatestFleets = new LatestFleetsEndpoints(string.Empty, true); V1Fleet model = await internalLatestFleets.FleetAsync(inputToken, long.MinValue); Assert.False(model.IsFreeMove); Assert.False(model.IsRegistered); Assert.False(model.IsVoiceEnabled); }