public void IncreaseChildCount_adds_child_and_increases_it() { var entityUnderTest = new DreamMainStatTag("Hello"); entityUnderTest.IncreaseChildCount("there"); entityUnderTest.ChildStatTags.Single(x => x.Tag == "There").TagCount.Should().Be(1); entityUnderTest.IncreaseChildCount("THERE"); entityUnderTest.ChildStatTags.Single(x => x.Tag == "There").TagCount.Should().Be(2); }
public void IncreaseCount_causes_TagCount_to_increase() { var entityUnderTest = new DreamMainStatTag("Hello"); entityUnderTest.TagCount.Should().Be(0); entityUnderTest.IncreaseCount(); entityUnderTest.TagCount.Should().Be(1); entityUnderTest.IncreaseCount(); entityUnderTest.TagCount.Should().Be(2); }
private DreamMainStatTag GetExistingOrCreateMainTag(string tagName) { var existingTag = TagStatistics.SingleOrDefault(x => x.IsTag(tagName)); if (existingTag != null) { return(existingTag); } var newStatTag = new DreamMainStatTag(tagName); _tagStatistics.Add(newStatTag); return(newStatTag); }
public void TagCount_initially_is_0() { var entityUnderTest = new DreamMainStatTag("Hello"); entityUnderTest.TagCount.Should().Be(0); }