public void MadsenvEastJordanIrrigationCo()
        {
            var property = new LegalProperty("cannibal minks");

            var test = new AbnormallyDangerousActivity(ExtensionMethods.Tortfeasor)
            {
                Causation = new Causation(ExtensionMethods.Tortfeasor)
                {
                    FactualCause = new FactualCause(ExtensionMethods.Tortfeasor)
                    {
                        IsButForCaused = lp => lp is EastJordanIrrigationCo
                    },
                    ProximateCause = new ProximateCause(ExtensionMethods.Tortfeasor)
                    {
                        IsDirectCause = lp => false,
                        IsForeseeable = lp => false,
                    }
                },
                IsExplosives    = p => true,
                SubjectProperty = property,
                Injury          = new Damage(ExtensionMethods.Tortfeasor)
                {
                    SubjectProperty = property,
                    ToValue         = p => true //they are dead
                }
            };

            var testResult = test.IsValid(new Madsen(), new EastJordanIrrigationCo());

            Console.WriteLine(test.ToString());
            Assert.IsFalse(testResult);
        }
Exemplo n.º 2
0
        public void SpanovPeriniCorp()
        {
            var property = new LegalProperty("garage in Brooklyn");
            var test     = new AbnormallyDangerousActivity(ExtensionMethods.Tortfeasor)
            {
                IsExplosives    = p => p.Equals(property),
                SubjectProperty = property,
                Injury          = new Damage(ExtensionMethods.Tortfeasor)
                {
                    SubjectProperty = property,
                    ToValue         = p => true,
                },
            };

            var testResult = test.IsValid(new Spano(), new PeriniCorp());

            Assert.IsTrue(testResult);
            Console.WriteLine(test.ToString());
        }