public void FrenchTest() { using (var stringclass = new StringClass()) { Assert.Equal(FRENCH_SENTENCE_1, stringclass.Echo(FRENCH_SENTENCE_1)); Assert.Equal(FRENCH_SENTENCE_2, stringclass.Echo(FRENCH_SENTENCE_2)); } }
public void EnglishTest() { using (var stringclass = new StringClass()) { Assert.Equal(ENGLISH_SENTENCE_1, stringclass.Echo(ENGLISH_SENTENCE_1)); Assert.Equal(ENGLISH_SENTENCE_2, stringclass.Echo(ENGLISH_SENTENCE_2)); } }
public void MemoryLeakTest() { const int NUM_ITERATIONS = 100000; using (var stringclass = new StringClass()) { for (int i = 0; i < NUM_ITERATIONS; i++) { Assert.Equal(FRENCH_SENTENCE_1, stringclass.Echo(FRENCH_SENTENCE_1)); } } }