Wes xx mediapipe integration

This commit is contained in:
Jelle De Geest
2023-03-12 20:34:16 +00:00
parent 8349b5f149
commit b11eeb465c
975 changed files with 192230 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
// Copyright (c) 2021 homuler
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
using NUnit.Framework;
namespace Mediapipe.Tests
{
public class PacketTest
{
#region #DebugString
[Test]
public void DebugString_ShouldReturnDebugString_When_InstantiatedWithDefaultConstructor()
{
using (var packet = new BoolPacket())
{
Assert.AreEqual("mediapipe::Packet with timestamp: Timestamp::Unset() and no data", packet.DebugString());
}
}
#endregion
#region #DebugTypeName
[Test]
public void DebugTypeName_ShouldReturnTypeName_When_ValueIsNotSet()
{
using (var packet = new BoolPacket())
{
Assert.AreEqual("{empty}", packet.DebugTypeName());
}
}
#endregion
#region #RegisteredTypeName
[Test]
public void RegisteredTypeName_ShouldReturnEmptyString()
{
using (var packet = new BoolPacket())
{
Assert.AreEqual("", packet.RegisteredTypeName());
}
}
#endregion
#region #ValidateAsProtoMessageLite
[Test]
public void ValidateAsProtoMessageLite_ShouldReturnInvalidArgument_When_ValueIsBool()
{
using (var packet = new BoolPacket(true))
{
Assert.AreEqual(Status.StatusCode.InvalidArgument, packet.ValidateAsProtoMessageLite().Code());
}
}
#endregion
}
}