Пример #1
0
    public void ValidateStringBuilderPerformance()
    {
        var swm = new StopWatchMeasure();

        var test = new TimeMeasures(swm, short.MaxValue);

        Console.WriteLine("StringBuilderVSStringConcatVSPlusPlus");
        test.StringBuilderVSStringConcatVSPlusPlus();

        Assert.Equal("StringBuilder", test.GetResults().OrderBy(a => a.Value).FirstOrDefault().Key);
    }
Пример #2
0
    public void ValidateEqualsUsageInQuery()
    {
        var swm = new StopWatchMeasure();

        var test1 = new TimeMeasures(swm, short.MaxValue);

        Console.WriteLine("ToLowerInQueryVSIndexOf");
        test1.ToLowerInQueryVSIndexOf();

        Assert.Equal("ToLower()", test1.GetResults().OrderBy(a => a.Value).FirstOrDefault().Key);
    }