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()); }
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()); }
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()); }
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()); }