public void EqualityTest() { try { IavaSkeletonFrameEventArgs eventArgs1 = new IavaSkeletonFrameEventArgs(new List<int>() { 1, 2, 3 }, 123456789); IavaSkeletonFrameEventArgs eventArgs2 = new IavaSkeletonFrameEventArgs(new List<int>() { 1, 2, 3 }, 123456789); IavaSkeletonFrameEventArgs eventArgs3 = new IavaSkeletonFrameEventArgs(new List<int>() { 3, 2, 1 }, 987654321); // Make sure eventArgs1 does not equal null Assert.IsFalse(eventArgs1 == null); // Make sure null does not equal eventArgs1 Assert.IsFalse(null == eventArgs1); // Make sure eventArgs1 and eventArgs3 are not equal Assert.IsFalse(eventArgs1 == eventArgs3); // Make sure eventArgs1 and eventArgs2 are equal Assert.IsTrue(eventArgs1 == eventArgs2); // Make sure eventArgs1 equals itself Assert.IsTrue(eventArgs1 == eventArgs1); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void EqualsTest() { try { IavaSkeletonFrameEventArgs eventArgs1 = new IavaSkeletonFrameEventArgs(new List<int>() { 1, 2, 3 }, 123456789); IavaSkeletonFrameEventArgs eventArgs2 = new IavaSkeletonFrameEventArgs(new List<int>() { 1, 2, 3 }, 123456789); IavaSkeletonFrameEventArgs eventArgs3 = new IavaSkeletonFrameEventArgs(new List<int>() { 3, 2, 1 }, 987654321); // Make sure eventArgs1 does not equal null Assert.IsFalse(eventArgs1.Equals(null)); // Make sure eventArgs1 does not equal a completly different object Assert.IsFalse(eventArgs1.Equals("Not a eventArgs.")); // Make sure eventArgs1 and eventArgs3 are not equal Assert.IsFalse(eventArgs1.Equals(eventArgs3)); // Make sure eventArgs1 and eventArgs2 are equal Assert.IsTrue(eventArgs1.Equals(eventArgs2)); // Make sure eventArgs1 equals itself Assert.IsTrue(eventArgs1.Equals(eventArgs1)); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void ConstructorTest() { try { List<int> skeletonIDs = new List<int>() { 1, 2, 3 }; long timestamp = 123456789; IavaSkeletonFrameEventArgs eventArgs = new IavaSkeletonFrameEventArgs(skeletonIDs, timestamp); // Make sure the properties got set correctly Assert.AreEqual(skeletonIDs, eventArgs.SkeletonIDs); Assert.AreEqual(timestamp, eventArgs.Timestamp); } catch (Exception ex) { Assert.Fail(ex.Message); } }