示例#1
0
        public void UsingCallerMemberNameIsSlowerThanCaliburnMicro45_NoHandler()
        {
            var blueVM       = new BlueVM();
            var competitorVM = new CaliburnVM();

            var count  = 0;
            var actual = Measure.ExecutionTimeFactor(() => competitorVM.IntProperty45 = count++, () => blueVM.IntProperty45 = count++);

            Assert.IsTrue(actual.IsFaster());
        }
示例#2
0
        public void UsingPropertyExpressionIsFasterThanMVVMLight_NoHandler()
        {
            var blueVM       = new BlueVM();
            var competitorVM = new LightVM();

            var count  = 0;
            var actual = Measure.ExecutionTimeFactor(() => blueVM.IntProperty40 = count++, () => competitorVM.IntProperty = count++);

            Assert.IsTrue(actual.IsFaster(), string.Format("[{0}] is not faster than [{1}]", actual.MinExecutionTimeFaster, actual.MinExecutionTimeSlower));
        }
示例#3
0
        public void UsingCallerMemberNameIsFasterThanCaliburnMicro40_NoHandler()
        {
            var blueVM       = new BlueVM();
            var competitorVM = new CaliburnVM();

            var count  = 0;
            var actual = Measure.ExecutionTimeFactor(() => blueVM.IntProperty45 = count++, () => competitorVM.IntProperty40 = count++);

            var minimumFactor = 8;

            Assert.IsTrue(actual.IsFasterBy(minimumFactor), (string.Format("[{0}] is not faster than [{1}] by factor [{2}]", actual.MinExecutionTimeFaster, actual.MinExecutionTimeSlower, minimumFactor)));
        }