public void ClearTest() { // Arrange var retorts = new Retorts("test"); var question = "question1_test"; var answer = "defaultAnswer1_test"; retorts.Add(question.Trim(), answer); Assert.True(retorts.Count() > 0); var expectedSize = 0; // Act retorts.Clear(); var actualSize = retorts.Count(); // Assert Assert.Equal(expectedSize, actualSize); }
public void CountTest(bool mustHaveEntries) { // Arrange var retorts = new Retorts("test"); retorts.Clear(); var expectedSize = 0; if (mustHaveEntries) { var question = "question1_test"; var answer = "defaultAnswer1_test"; Assert.True(retorts.Add(question.Trim(), answer)); expectedSize = 1; } // Act var actualSize = retorts.Count(); // Assert Assert.Equal(expectedSize, actualSize); }