Ejemplo n.º 1
0
 public void TestAddForce(int cityId, int districtId, int regionId, bool success, bool increase)
 {
     helper = new RegionOperationServiceTestHelper(regionRepository.Object);
     Assert.AreEqual(regionRepository.Object.Count(), 8);
     if (success)
     {
         Assert.IsTrue(helper.TestAddRegionForce(cityId, districtId, regionId));
     }
     else
     {
         Assert.IsFalse(helper.TestAddRegionForce(cityId, districtId, regionId));
     }
     Assert.AreEqual(regionRepository.Object.Count(), 8 + (increase ? 1 : 0));
 }
 public void TestAddForce(int cityId, int districtId, int regionId, bool success, bool increase)
 {
     helper = new RegionOperationServiceTestHelper(regionRepository.Object);
     Assert.AreEqual(regionRepository.Object.Count(), 8);
     if (success)
     {
         Assert.IsTrue(helper.TestAddRegionForce(cityId, districtId, regionId));
     }
     else
     {
         Assert.IsFalse(helper.TestAddRegionForce(cityId, districtId, regionId));
     }
     Assert.AreEqual(regionRepository.Object.Count(), 8 + (increase ? 1 : 0));
 }
Ejemplo n.º 3
0
 public void TestDelete(int cityId, int districtId, int regionId, bool success)
 {
     helper = new RegionOperationServiceTestHelper(regionRepository.Object);
     Assert.AreEqual(regionRepository.Object.Count(), 8);
     if (success)
     {
         Assert.IsTrue(helper.TestDeleteRegion(cityId, districtId, regionId));
         Assert.AreEqual(regionRepository.Object.Count(), 7);
     }
     else
     {
         Assert.IsFalse(helper.TestDeleteRegion(cityId, districtId, regionId));
         Assert.AreEqual(regionRepository.Object.Count(), 8);
     }
 }
 public void TestDelete(int cityId, int districtId, int regionId, bool success)
 {
     helper = new RegionOperationServiceTestHelper(regionRepository.Object);
     Assert.AreEqual(regionRepository.Object.Count(), 8);
     if (success)
     {
         Assert.IsTrue(helper.TestDeleteRegion(cityId, districtId, regionId));
         Assert.AreEqual(regionRepository.Object.Count(), 7);
     }
     else
     {
         Assert.IsFalse(helper.TestDeleteRegion(cityId, districtId, regionId));
         Assert.AreEqual(regionRepository.Object.Count(), 8);
     }
 }