public void Test_ToByteArray() { EightBimValue value = Get8BimValue(); byte[] bytes = value.ToByteArray(); Assert.AreEqual(273, bytes.Length); }
public void Test_IEquatable() { EightBimValue first = Get8BimValue(); EightBimValue second = Get8BimValue(); Assert.IsTrue(first == second); Assert.IsTrue(first.Equals(second)); Assert.IsTrue(first.Equals((object)second)); }
private static void TestProfileValues(EightBimProfile profile) { Assert.IsNotNull(profile); Assert.AreEqual(25, profile.Values.Count()); EightBimValue firstValue = profile.Values.First(); Assert.AreEqual(1061, firstValue.ID); byte[] bytes = new byte[16] { 154, 137, 173, 93, 40, 109, 186, 33, 2, 200, 203, 169, 103, 5, 63, 219 }; CollectionAssert.AreEqual(bytes, firstValue.ToByteArray()); foreach (EightBimValue value in profile.Values) { Assert.IsNotNull(value.ToByteArray()); } }