public ActionResult WarRoom() { var currentUser = User.Identity.Name; ViewBag.Message = "War Room"; var warPlan = queries.GetWarPlan(); var currentWar = apiCall.GetCurrentWar("#8UJGPROJ"); if (currentWar.State == "preparation" | currentWar.State == "inWar") { currentWar.OpposingClan.MembersInWars = reservation.AssignTargets(currentWar.OpposingClan.MembersInWars); return(View(BuildWarViewModel(currentWar, warPlan))); } queries.ClearTargets(); return(View("NoWar")); }
public void GetCurrentWar_Displays_List_Of_Opponents() { var expected = "mosi2"; var data = apiCalls.GetCurrentWar(clanTag); var actual = data.OpposingClan.MembersInWars.Where(n => n.MapPosition == 11).Single(); Assert.That(actual.Name, Is.EqualTo(expected)); }