public void ItemSummaryShouldUseSingularFormWhenRemainingMonsterEnduranceIsOne() { var encounter = new Encounter(1, "Monster", "Encounter description", 2, 3, 3); var resource = CreateEncounterResource(encounter); var response = resource.Post(encounter.Id.ToString(), CreateRequest(encounter.Id, CreateFormUrlEncodedContent(ClientEndurance))); var item = response.Content.ReadAsOrDefault(); var expectedSummary = string.Format("The {0} has 1 Endurance Point", encounter.Title); Assert.AreEqual(expectedSummary, item.Summary.Text); }
private static EncounterResource CreateEncounterResource(Encounter encounter) { return new EncounterResource(new Repository<Encounter>(encounter)); }
private static RoomResource CreateRoomResource(Room room, Encounter encounter) { return new RoomResource(new Repository<Room>(room), new Repository<Encounter>(encounter)); }