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 TestPersonalJurisdictionIsValid()
        {
            var testSubject = new PersonalJurisdiction(new StateCourt("CA"))
            {
                GetDomicileLocation = lp => lp is ExampleDefendant ? new VocaBase("CA") : null,
            };

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

            Assert.IsTrue(testResult);
            Console.WriteLine(testSubject.ToString());
        }
        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());
        }
        public void TestBothLiveSameState()
        {
            const string MA = "Massachusetts";
            const string GA = "Georgia";

            var testSubject = new PersonalJurisdiction(new StateCourt(MA))
            {
                GetDomicileLocation = lp => new VocaBase(MA),
                GetInjuryLocation   = lp => new VocaBase(GA)
            };

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

            Assert.IsTrue(testResult);
            Console.WriteLine(testSubject.ToString());
        }
Exemplo n.º 5
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.º 6
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.º 7
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);
        }