コード例 #1
0
        public void Exercise_GetExpectedTankValues()
        {
            // Arrange
            var target = new WNEfficiencyService();

            // Act
            var actual = target.GetExpectedTankValues();

            // Assert
            Assert.AreNotEqual(0, actual.Version);
            Assert.AreNotEqual(0, actual.Values.Count);
        }
コード例 #2
0
ファイル: AdminServiceTest.cs プロジェクト: rglos/WotKitWeb
        public void Exercise_UpdateVehicles()
        {
            // Arrange
            var wargamingApiService = new WargamingApiService();
            var listOfVehicles = wargamingApiService.GetListOfVehicles();
            var wnEfficiencyService = new WNEfficiencyService();
            var expectedTankValues = wnEfficiencyService.GetExpectedTankValues();
            var target = new AdminService();

            // Act
            var actual = target.UpsertVehicles(listOfVehicles, expectedTankValues);

            // Assert
            Assert.IsNotNull(actual);
            var total = actual.VehiclesInserted + actual.VehiclesUpdated;
            Assert.AreEqual(total, actual.Total);
            // TODO: We should check the database to ensure there are tanks in the tank table
        }