コード例 #1
0
 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));
     }
 }
コード例 #2
0
 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));
     }
 }
コード例 #3
0
        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));
                }
            }
        }