|
|
|
|
|
|
public class DatasetCaptureTests |
|
|
|
{ |
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void RegisterSensor_ReportsProperJson() |
|
|
|
{ |
|
|
|
var egoDescription = @"the main car driving in simulation"; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportCapture_ReportsProperJson() |
|
|
|
{ |
|
|
|
var filename = "my/file.png"; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[UnityTest] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public IEnumerator StartNewSequence_ProperlyIncrementsSequence() |
|
|
|
{ |
|
|
|
var timingsExpected = new(int step, int timestamp, bool expectNewSequence)[] |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportAnnotation_AddsProperJsonToCapture() |
|
|
|
{ |
|
|
|
var filename = "my/file.png"; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportAnnotationValues_ReportsProperJson() |
|
|
|
{ |
|
|
|
var values = new[] |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportAnnotationFile_WhenCaptureNotExpected_Throws() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportAnnotationValues_WhenCaptureNotExpected_Throws() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportAnnotationAsync_WhenCaptureNotExpected_Throws() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ResetSimulation_WithUnreportedAnnotationAsync_LogsError() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ResetSimulation_CallsSimulationEnding() |
|
|
|
{ |
|
|
|
int timesCalled = 0; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void AnnotationAsyncIsValid_ReturnsProperValue() |
|
|
|
{ |
|
|
|
LogAssert.ignoreFailingMessages = true; //we aren't worried about "Simulation ended with pending..."
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void AnnotationAsyncReportFile_ReportsProperJson() |
|
|
|
{ |
|
|
|
var expectedAnnotation = $@" ""annotations"": [
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void AnnotationAsyncReportValues_ReportsProperJson() |
|
|
|
{ |
|
|
|
var values = new[] |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void CreateAnnotation_MultipleTimes_WritesProperTypeOnce() |
|
|
|
{ |
|
|
|
var annotationDefinitionGuid = new Guid(10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void CreateAnnotation_MultipleTimesWithDifferentParameters_WritesProperTypes() |
|
|
|
{ |
|
|
|
var annotationDefinitionGuid = new Guid(10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportMetricValues_WhenCaptureNotExpected_Throws() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ReportMetricAsync_WhenCaptureNotExpected_Throws() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void ResetSimulation_WithUnreportedMetricAsync_LogsError() |
|
|
|
{ |
|
|
|
var ego = DatasetCapture.RegisterEgo(""); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void MetricAsyncIsValid_ReturnsProperValue() |
|
|
|
{ |
|
|
|
LogAssert.ignoreFailingMessages = true; //we aren't worried about "Simulation ended with pending..."
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[UnityTest] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public IEnumerator MetricReportValues_WithNoReportsInFrames_DoesNotIncrementStep() |
|
|
|
{ |
|
|
|
var values = new[] { 1 }; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[UnityTest] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public IEnumerator SensorHandleReportMetric_BeforeReportCapture_ReportsProperJson() |
|
|
|
{ |
|
|
|
var values = new[] { 1 }; |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void MetricAsyncReportValues_ReportsProperJson( |
|
|
|
[Values(MetricTarget.Global, MetricTarget.Capture, MetricTarget.Annotation)] MetricTarget metricTarget, |
|
|
|
[Values(true, false)] bool async, |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void CreateMetric_MultipleTimesWithDifferentParameters_WritesProperTypes() |
|
|
|
{ |
|
|
|
var metricDefinitionGuid = new Guid(10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
[Test] |
|
|
|
#if SIMULATION_TOOLS_PRESENT
|
|
|
|
[Unity.Simulation.Tools.CloudTest] |
|
|
|
#endif
|
|
|
|
public void CreateAnnotationOrMetric_WithSpecValues_WritesProperTypes( |
|
|
|
[Values(AdditionalInfoKind.Annotation, AdditionalInfoKind.Metric)] AdditionalInfoKind additionalInfoKind) |
|
|
|
{ |
|
|
|