Beispiel #1
0
        public void ILoggerIsAMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertMethod <ILogger, string>((l, s) => l.Log(s));
            test.Execute();
        }
        public void IRandomNextOverlaodTakes2Ints()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertMethod <IRandom, int, int, int>((r, min, max) => r.Next(min, max));
            test.Execute();
        }
        public void IRandomNextOverloadTakesNothing()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertMethod <IRandom, int>(r => r.Next());
            test.Execute();
        }
        public void FigureContainsIsAbstractMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertMethod <Figure, Point, bool>(
                (f, p) => f.Contains(p),
                new MemberAccessLevelVerifier(AccessLevels.Public),
                new MemberIsAbstractVerifier());
            test.Execute();
        }
        public void FigureCalculateAreaIsAbstractMethod()
        {
            // TestTools Code
            StructureTest test = Factory.CreateStructureTest();

            test.AssertMethod <Figure, double>(
                f => f.CalculateArea(),
                new MemberAccessLevelVerifier(AccessLevels.Public),
                new MemberIsAbstractVerifier());
            test.Execute();
        }