コード例 #1
0
        public void MartinvHerzog()
        {
            var test = new NegligenceByStatute(ExtensionMethods.Tortfeasor)
            {
                IsObeyStatute = lp => !(lp is Herzog),
            };
            var testResult = test.IsValid(new Martin(), new Herzog());

            Assert.IsTrue(testResult);

            Console.WriteLine(test.ToString());
        }
コード例 #2
0
ファイル: TedlavEllmanTests.cs プロジェクト: nofuture-git/31g
        public void TedlavEllman()
        {
            var test = new NegligenceByStatute(ExtensionMethods.Tortfeasor)
            {
                IsObeyStatute          = lp => !(lp is Ellman),
                IsObedienceAddToDanger = lp => lp is Ellman
            };

            var testResult = test.IsValid(new Tedla(), new Ellman());

            Assert.IsFalse(testResult);

            Console.WriteLine(test.ToString());
        }
コード例 #3
0
        public void GorrisvScott()
        {
            var test = new NegligenceByStatute(ExtensionMethods.Tortfeasor)
            {
                IsObeyStatute = lp => !(lp is Scott),
                IsGroupMemberOfStatuesProtection = lp => !(lp is Scott) && !(lp is Gorris)
            };

            var testResult = test.IsValid(new Gorris(), new Scott());

            Assert.IsFalse(testResult);

            Console.WriteLine(test.ToString());
        }
コード例 #4
0
        public void UhrvEastGreenbushCentralSchoolDistrict()
        {
            var test = new NegligenceByStatute(ExtensionMethods.Tortfeasor)
            {
                IsObeyStatute = lp => !(lp is EastGreenbushCentralSchoolDistrict),
                IsGroupMemberOfStatuesProtection = lp => lp is Uhr || lp is EastGreenbushCentralSchoolDistrict,
                IsDisobedienceCauseForAction     = lp => false
            };

            var testResult = test.IsValid(new Uhr(), new EastGreenbushCentralSchoolDistrict());

            Assert.IsFalse(testResult);

            Console.WriteLine(test.ToString());
        }