Ejemplo n.º 1
0
        public void SpellervSearsRoebuckandCo()
        {
            var test = new ProductStrictLiability(ExtensionMethods.Tortfeasor)
            {
                SubjectProperty = new Refrigerator(),
                Injury          = new Harm(ExtensionMethods.Plaintiff)
                {
                    IsDeath = lp => lp is Speller
                },
                //case doesn't specify this
                IsDirectCause = p => p is Refrigerator,
                //only that circumstances are enough to proof this
                IsDefectiveAtTimeOfSale = p => p is Refrigerator
            };

            var testResult = test.IsValid(new Speller(), new SearsRoebuckandCo());

            Assert.IsTrue(testResult);
            Console.WriteLine(test.ToString());
        }
Ejemplo n.º 2
0
        public void TemplevWeanUnitedInc()
        {
            var test = new ProductStrictLiability(ExtensionMethods.Tortfeasor)
            {
                Injury = new Harm(ExtensionMethods.Plaintiff)
                {
                    IsDisability     = lp => lp is Temple,
                    IsOfFreedomLost  = lp => lp is Temple,
                    IsOfPleasureLost = lp => lp is Temple
                },
                IsDirectCause = p => p is Warco75TonPowerPunchPress,
                //was modified which caused harm
                IsDefectiveAtTimeOfSale = p => false,
                SubjectProperty         = new Warco75TonPowerPunchPress()
            };
            var testResult = test.IsValid(new Temple(), new WeanUnitedInc());

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