コード例 #1
0
        public void Read__Reading_A_Valid_BoolType()
        {
            byte[] data = File.ReadAllBytes("Content/Tests/BoolType/BoolType-Data.bin");

            BoolType boolType = new BoolType();
            boolType.Read(data);

            Assert.IsTrue(boolType.Value);
        }
コード例 #2
0
        public void Write__Writing_A_Valid_BoolType()
        {
            BoolType boolType = new BoolType();
            boolType.Value = true;

            byte[] writtenData = boolType.Write();
            byte[] expected = File.ReadAllBytes("Content/Tests/BoolType/BoolType-Data.bin");

            Assert.AreEqual(BitConverter.ToString(expected), BitConverter.ToString(writtenData));
        }