Пример #1
0
        public void TestSystems()
        {
            // Setup
            string         resource = "api-v1/systems";
            string         json     = Encoding.UTF8.GetString(Resources.CapitalSystems);
            List <JObject> data     = new List <JObject> {
                new JObject(), new JObject(), new JObject()
            };

            fakeEdsmRestClient.Expect(resource, json, data);

            // Act
            string[]          systemNames = new string[] { "Sol", "Achenar", "Alioth" };
            List <StarSystem> starSystems = fakeEdsmService.GetStarMapSystems(systemNames, true, false);

            // Assert
            Assert.AreEqual(3, starSystems?.Count);
        }
Пример #2
0
        public void TestDataProviderEmptySystem()
        {
            // Setup
            string         resource = "api-v1/systems";
            string         json     = "{}";
            List <JObject> data     = new List <JObject>();

            fakeEdsmRestClient.Expect(resource, json, data);

            StarSystem starSystem = dataProviderService.GetSystemData("Lagoon Sector GW-V b2-6");

            Assert.IsNotNull(starSystem.population);
        }