Exemplo n.º 1
0
        public void FordvSmokyMountainVW()
        {
            const string FL = "Florida";
            const string NC = "North Carolina";

            var testSubject = new PersonalJurisdiction(new StateCourt(FL))
            {
                Consent             = Consent.NotGiven(),
                GetDomicileLocation =
                    lp => lp is FloridaFord ? new VocaBase(FL) : new VocaBase(NC),
                GetInjuryLocation = lp => lp is FloridaFord ? new VocaBase(FL) : null,
                MinimumContact    = new MinimumContact(new StateCourt(FL))
                {
                    GetCommerciallyEngagedLocation = lp =>
                                                     lp is SmokyMountainVW ? new[] { new VocaBase(NC) } : null,
                    //Smoky Mtn sold Florida Ford a rigged car
                    GetIntentionalTortTo = lp => lp is SmokyMountainVW ? new FloridaFord() : null
                }
            };

            var testResult = testSubject.IsValid(new FloridaFord(), new SmokyMountainVW());

            Assert.IsTrue(testResult);
            Console.WriteLine(testSubject.ToString());
        }
        public void DesnickvAmericanBroadcastingCompaniesInc()
        {
            var test = new TrespassToPerson(ExtensionMethods.Tortfeasor)
            {
                Consent         = Consent.NotGiven(),
                Causation       = Causation.ItsObvious(),
                SubjectProperty = new LegalProperty("some office"),
                Injury          = new Defamation(ExtensionMethods.Tortfeasor)
                {
                    IsFalseStatement     = (l1, l2) => l1 is Desnick && l2 is AmericanBroadcastingCompaniesInc,
                    IsPublishedStatement = lp => lp is AmericanBroadcastingCompaniesInc,
                    IsUnwantedStatement  = lp => lp is Desnick
                },
            };

            var testResult = test.IsValid(new Desnick(), new AmericanBroadcastingCompaniesInc());

            Assert.IsTrue(testResult);


            test.Injury = new InvasionOfPrivacy(ExtensionMethods.Tortfeasor)
            {
                IsInPlainSight         = lp => true,
                IsExpectationOfPrivacy = lp => false
            };

            testResult = test.IsValid(new Desnick(), new AmericanBroadcastingCompaniesInc());
            Assert.IsFalse(testResult);

            Console.WriteLine(test.ToString());
        }
Exemplo n.º 3
0
        public void GoldenPressIncvRylands()
        {
            var test = new Encroachment
            {
                Consent         = Consent.NotGiven(),
                SubjectProperty = new LegalProperty("some building")
                {
                    IsEntitledTo = lp => lp is Rylands
                },
                IsGoodFaithIntent  = lp => true,
                IsUseAffected      = lp => false,
                IsRemovalCostGreat = lp => lp is Rylands
            };
            var testResult = test.IsValid(new GoldenPressInc(), new Rylands());

            Assert.IsFalse(testResult);
            Console.WriteLine(test.ToString());
        }
Exemplo n.º 4
0
        public void SomervillevJacobs()
        {
            var test = new ImprovingTrespassers
            {
                SubjectProperty = new LegalProperty("Lot 47")
                {
                    IsEntitledTo = lp => lp is Somerville
                },
                Consent = Consent.NotGiven(),
                IsOwnerGoodFaithOblivious   = lp => lp is Somerville,
                IsTrespasserGoodFaithIntent = lp => lp is Jacobs
            };

            var testResult = test.IsValid(new Somerville(), new Jacobs());

            Assert.IsTrue(testResult);
            Console.WriteLine(test.ToString());
        }
Exemplo n.º 5
0
        public void OKeeffevSnyder()
        {
            var test = new AdversePossession(ExtensionMethods.Disseisor)
            {
                Consent = Consent.NotGiven(),
                IsExclusivePossession     = lp => lp is Snyder,
                IsContinuousPossession    = lp => true,
                IsOpenNotoriousPossession = lp => false,
                SubjectProperty           = new OKeeffePaintings()
                {
                    IsEntitledTo     = lp => lp is OKeeffe,
                    IsInPossessionOf = lp => lp is Snyder
                },
                Inception = new DateTime(1972, 6, 1)
            };

            var testResult = test.IsValid(new OKeeffe(), new Snyder());

            Console.WriteLine(test.ToString());
            Assert.IsFalse(testResult);
        }
Exemplo n.º 6
0
        public void BrownvGobble()
        {
            var test = new AdversePossession(ExtensionMethods.Disseisor)
            {
                SubjectProperty = new TwoFeetWideTract
                {
                    IsEntitledTo     = lp => lp is Gobble,
                    IsInPossessionOf = lp => lp is Brown,
                },
                Consent = Consent.NotGiven(),
                IsOpenNotoriousPossession = p => p is Brown,
                IsExclusivePossession     = p => p is Brown,
                IsContinuousPossession    = p => p is Brown,
                Inception = new DateTime(1931, 1, 1)
            };

            var testResult = test.IsValid(new Brown(), new Gobble());

            Console.WriteLine(test.ToString());
            Assert.IsTrue(testResult);
        }
Exemplo n.º 7
0
        public void AustinvHealy03()
        {
            var testSubject = new PersonalJurisdiction(new StateCourt("Minnesota"))
            {
                Consent        = Consent.NotGiven(),
                MinimumContact = new MinimumContact
                {
                    GetCommerciallyEngagedLocation = lp =>
                                                     lp is Austin
                            ? new[] { new VocaBase("North Dakota"), new VocaBase("South Dakota"), new VocaBase("Minnesota") }
                            : null,
                },
                GetInjuryLocation   = lp => new VocaBase("Minnesota"),
                GetDomicileLocation = GetState,
                GetCurrentLocation  = GetState
            };

            var testResult = testSubject.IsValid(new HealyAsPlaintiff(), new AustinAsDefendant());

            Assert.IsTrue(testResult);
            Console.WriteLine(testSubject.ToString());
        }
Exemplo n.º 8
0
        public void PackardvSmokyMountainVW()
        {
            const string PA = "Pennsylvania";
            const string NC = "North Carolina";

            var testSubject = new PersonalJurisdiction(new StateCourt(PA))
            {
                Consent             = Consent.NotGiven(),
                GetDomicileLocation = lp => lp is PennsylvaniaPackard ? new VocaBase(PA) : new VocaBase(NC),
                GetInjuryLocation   = lp => lp is PennsylvaniaPackard ? new VocaBase(PA) : null,
                MinimumContact      = new MinimumContact(new StateCourt(PA))
                {
                    GetCommerciallyEngagedLocation = lp => lp is SmokyMountainVW ? new[] { new VocaBase(NC) } : null,
                    //because the dealership reached out to the Plaintiff in PA, PA has jurisdiction
                    GetDirectedContactTo = lp => lp is SmokyMountainVW ? new PennsylvaniaPackard() : null
                }
            };

            var testResult = testSubject.IsValid(new PennsylvaniaPackard(), new SmokyMountainVW());

            Assert.IsTrue(testResult);
            Console.WriteLine(testSubject.ToString());
        }
Exemplo n.º 9
0
        public void HudsonvSmokyMountainVW()
        {
            var testSubject = new PersonalJurisdiction(new StateCourt("Ohio"))
            {
                Consent = Consent.NotGiven(),
                //this fires true when the defendant lives in the state of injury
                GetDomicileLocation = lp => lp is Hudson ? new VocaBase("Ohio") : new VocaBase("North Carolina"),
                GetInjuryLocation   = lp => lp is Hudson ? new VocaBase("Ohio") : null,
                GetCurrentLocation  = lp => lp is Hudson ? new VocaBase("Ohio") : new VocaBase("North Carolina"),
                MinimumContact      = new MinimumContact(new StateCourt("Ohio"))
                {
                    //the dealership sold the car, not entered into a contract to finance it
                    GetCommerciallyEngagedLocation = lp => lp is SmokyMountainVW ? new[] { new VocaBase("North Carolina") } : null,
                    //Hudson went to NC and bought the car
                    GetDirectedContactTo = lp => lp is Hudson ? new SmokyMountainVW() : null
                }
            };

            var testResult = testSubject.IsValid(new Hudson(), new SmokyMountainVW());

            Console.WriteLine(testSubject.ToString());
            Assert.IsFalse(testResult);
        }
        public void TestIsValidWithConsent()
        {
            const string MA = "Massachusetts";
            const string GA = "Georgia";

            var testSubject = new PersonalJurisdiction(new StateCourt(MA))
            {
                Consent             = Consent.NotGiven(),
                GetDomicileLocation = lp => lp is ExampleDefendant ? new VocaBase(GA) : new VocaBase(MA),
                GetCurrentLocation  = lp => lp is ExampleDefendant ? new VocaBase(GA) : new VocaBase(MA),
                GetInjuryLocation   = lp => lp is ExamplePlaintiff ? new VocaBase(MA) : null
            };

            var testResult = testSubject.IsValid(new ExamplePlaintiff(), new ExampleDefendant());

            Assert.IsFalse(testResult);
            Console.WriteLine(testSubject.ToString());

            testSubject.Consent = Consent.IsGiven();
            testResult          = testSubject.IsValid(new ExamplePlaintiff(), new ExampleDefendant());
            Assert.IsTrue(testResult);
            Console.WriteLine(testSubject.ToString());
        }
Exemplo n.º 11
0
        public void MarengoCaveCovRoss()
        {
            var test = new AdversePossession()
            {
                SubjectProperty = new LegalProperty("part of 'Marengo Cave'")
                {
                    IsEntitledTo     = lp => lp is Ross,
                    IsInPossessionOf = lp => lp is MarengoCaveCo
                },
                Consent = Consent.NotGiven(),
                EntitledOwnersAction = Act.DueDiligence(),
                Inception            = new DateTime(1908, 1, 1),
                //time the case was written
                Terminus = new DateTime(1937, 1, 1),
                IsContinuousPossession    = lp => true,
                IsExclusivePossession     = lp => true,
                IsOpenNotoriousPossession = lp => false
            };

            var testResult = test.IsValid(new MarengoCaveCo(), new Ross());

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