コード例 #1
0
        public void testFstHeader()
        {
            Trial     trial     = Fixtures.Fixtures.fstLightTrial;
            Run       run       = Fixtures.Fixtures.createLightFstRun(trial);
            ExportRun exportRun = ExportRun.Create(run, new ExportSettings(trial));

            Assert.AreEqual(15, run.Trial.Duration);
            Assert.AreEqual(11, run.RunEvents.Count);
            Assert.AreEqual(2.1, run.RunEvents[1].TimeTrackedInSeconds);

            List <string> headers = exportRun.Headers();
            List <string> expectedSubjectHeaders = new List <string>()
            {
                "Project", "SubjectID", "SubjectGroup", "Strain", "Sex",
                "TrialName", "TrialDuration", "DateRun", "TimeRun"
            };
            List <string> expectedDurationHeaders = new List <string>()
            {
                "Climbing Duration", "Swimming Duration", "Floating Duration", "Diving Duration"
            };
            List <string> expectedDetkeScoringHeaders = new List <string>()
            {
                "Climbing Score", "Swimming Score", "Floating Score", "Diving Score"
            };

            // standard, duration, frequency, latency, detke
            Assert.AreEqual(10 + 4 + 5 + 4 + 4, headers.Count, "Items on FST header output");
            Assert.AreEqual(expectedSubjectHeaders, headers.GetRange(0, 9));
            Assert.AreEqual(expectedDurationHeaders, headers.GetRange(10, 4));
            Assert.AreEqual(expectedDetkeScoringHeaders, headers.GetRange(23, 4));
            run.RunEvents.Clear();
        }
コード例 #2
0
        public void testObjectRecognitionHeader()
        {
            Trial     trial     = Fixtures.Fixtures.orTrial;
            Run       run       = Fixtures.Fixtures.createObjectRecognitionRun(trial);
            ExportRun exportRun = ExportRun.Create(run, new ExportSettings(trial));

            Assert.AreEqual(100, run.Trial.Duration);
            Assert.AreEqual(13, run.RunEvents.Count);
            Assert.AreEqual(1.1, run.RunEvents[1].TimeTrackedInSeconds);

            List <string> headers = exportRun.Headers();
            List <string> expectedSubjectHeaders = new List <string>()
            {
                "Project", "SubjectID", "SubjectGroup", "Strain", "Sex",
                "TrialName", "TrialDuration", "DateRun", "TimeRun"
            };

            List <string> expectedDurationHeaders = new List <string>()
            {
                "Object A Duration", "Object B Duration", "General Area Duration"
            };

            // standard, duration, frequency, latency
            Assert.AreEqual(10 + 3 + 3 + 3, headers.Count, "Items on Object Recognition header output");
            Assert.AreEqual(expectedSubjectHeaders, headers.GetRange(0, 9));
            Assert.AreEqual(expectedDurationHeaders, headers.GetRange(10, 3));
            run.RunEvents.Clear();
        }