aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.UnitTesting/TCC
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-03-27 17:49:22 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-03-27 17:49:22 +0200
commita3bcf6afe7959686a84050caa2064852ae223667 (patch)
tree24ec7b8b234f5ca975d0d1d6ea8378d1a5dd2587 /Software/Visual_Studio/Tango.UnitTesting/TCC
parent113e6f9a315a3cf3379eeb8e7c66b92fe839d56c (diff)
downloadTango-a3bcf6afe7959686a84050caa2064852ae223667.tar.gz
Tango-a3bcf6afe7959686a84050caa2064852ae223667.zip
Added timestamps to external bridge udp packet.
Fixed detection of long gone external bridge ppc's.
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting/TCC')
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/TCC/TCC Resources/bitmap_ok.bmpbin0 -> 1351734 bytes
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs20
2 files changed, 17 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC Resources/bitmap_ok.bmp b/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC Resources/bitmap_ok.bmp
new file mode 100644
index 000000000..0135298a5
--- /dev/null
+++ b/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC Resources/bitmap_ok.bmp
Binary files differ
diff --git a/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
index a96328e8b..475bc68fd 100644
--- a/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
+++ b/Software/Visual_Studio/Tango.UnitTesting/TCC/TCC_TST.cs
@@ -11,6 +11,7 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Tango.Core.IO;
+using Tango.CSV;
using Tango.PMR.TCC;
using Tango.TCC.BL;
@@ -23,13 +24,13 @@ namespace Tango.UnitTesting.TCC
[TestMethod]
public void Detect()
{
- var original_bitmap = Directory.GetCurrentDirectory() + "\\TCC\\TCC Resources\\bitmap.bmp";
+ var original_bitmap = Directory.GetCurrentDirectory() + "\\TCC\\TCC Resources\\bitmap_ok.bmp";
using (ColorDetector detector = new ColorDetector())
{
DetectionInput input = new DetectionInput()
{
- Number = 10,
+ Number = 5,
Columns = 10,
Rows = 11,
TargetIndex = 99,
@@ -57,7 +58,20 @@ namespace Tango.UnitTesting.TCC
Process.Start(outputBitmap);
}
- Assert.IsTrue(output.Number == 20);
+ var benchmarksCsvFile = TemporaryManager.Default.CreateFile(".csv");
+ benchmarksCsvFile.Persist = true;
+
+ using (CsvFile<DetectionColor> benchmarksRGB = new CsvFile<DetectionColor>(new CsvDestination(benchmarksCsvFile)))
+ {
+ foreach (var color in output.ColorMatrix)
+ {
+ benchmarksRGB.Append(color);
+ }
+ }
+
+ Helper.ShowInExplorer(benchmarksCsvFile);
+
+ Assert.IsTrue(output.Number == 15);
}
}