public void TestReasonableSuspicionIsValid00() { var testSubject = new ReasonableSuspicion { IsFactsConcludeToCriminalActivity = lp => lp is ExampleLawEnforcement, Stop = new SuspectStop { IsBeliefFreeToGo = lp => false, GetDetainedTimespan = lp => new TimeSpan(0, 15, 0), GetRequiredInvestigateTimespan = lp => new TimeSpan(0, 20, 0) } }; var testResult = testSubject.IsValid(new ExampleSuspect(), new ExampleLawEnforcement(), new ExampleInformant()); Assert.IsTrue(testResult); Console.WriteLine(testSubject.ToString()); }
public void TestReasonableSuspicionIsValid02() { var testSubject = new ReasonableSuspicion { GetInformationSource = lps => lps.FirstOrDefault(lp => lp is ExampleLawEnforcement), IsFactsConcludeToCriminalActivity = lp => lp is ExampleLawEnforcement, Stop = new SuspectStop { IsBeliefFreeToGo = lp => false, GetDetainedTimespan = lp => new TimeSpan(3, 0, 0), GetRequiredInvestigateTimespan = lp => new TimeSpan(0, 20, 0) } }; var testResult = testSubject.IsValid(new ExampleSuspect(), new ExampleLawEnforcement(), new ExampleInformant { IsInformationSufficientlyReliable = true }); Console.WriteLine(testSubject.ToString()); Assert.IsFalse(testResult); }