public void Read__Reading_A_Valid_RealType() { byte[] data = File.ReadAllBytes("Content/Tests/ChoiceType/ChoiceType-Data.bin"); ChoiceType choiceType = new ChoiceType(); choiceType.Read(data); Assert.AreEqual(2, choiceType.Value); }
public void Write__Writing_A_Valid_RealType() { ChoiceType choiceType = new ChoiceType(); choiceType.Value = 2; byte[] writtenData = choiceType.Write(); byte[] expected = File.ReadAllBytes("Content/Tests/ChoiceType/ChoiceType-Data.bin"); Assert.AreEqual(BitConverter.ToString(expected), BitConverter.ToString(writtenData)); }