示例#1
0
 public void Ram_Test()
 {
     CodeRamer.Initialize();
     CodeRamer.Ram("name",
                   () =>
     {
         int sum = 0;
         for (int i = 1; i <= 10000; i++)
         {
             sum += i;
         }
         Console.WriteLine($"sum: {sum}");
     });
 }
示例#2
0
        public void Ram_Test()
        {
            CodeRamer.Initialize();
            string output = CodeRamer.Ram("name",
                                          () =>
            {
                int sum = 0;
                for (int i = 1; i <= 10000; i++)
                {
                    sum += i;
                }
                sum.ShouldBe(50005000);
            });

            output.ShouldContain("\tRam:\t");
            output.ShouldContain("KB");
            output.ShouldContain("MB");
        }