Beispiel #1
0
        public void Invasive_IsCalculated_AccordingToSamplingLocation(MeningoSamplingLocation samplingLocation, YesNo expectedInvasive)
        {
            var meningoSending = new MeningoSending {
                SamplingLocation = samplingLocation
            };

            meningoSending.Invasive.Should().Be(expectedInvasive);
        }
Beispiel #2
0
 private static string ExportSamplingLocation(MeningoSamplingLocation samplingLocation, MeningoSending sending)
 {
     return samplingLocation == MeningoSamplingLocation.OtherInvasive
         ? sending.OtherInvasiveSamplingLocation
         : samplingLocation == MeningoSamplingLocation.OtherNonInvasive
             ? sending.OtherNonInvasiveSamplingLocation
             : ExportToString(samplingLocation);
 }
Beispiel #3
0
 public static bool IsInvasive(MeningoSamplingLocation samplingLocation)
 {
     return(samplingLocation.GetType().GetField(Enum.GetName(samplingLocation.GetType(), samplingLocation)).GetCustomAttributes(typeof(InvasiveSamplingLocationAttribute), false).Length > 0);
 }