コード例 #1
0
        public void ClearingForBytes()
        {
            byte[]            data   = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);

            Assert.IsNotNull(csData);

            csData.Clear();
            byte[] byData = csData.GetAsByteArray();
            Assert.IsNull(byData);
        }
コード例 #2
0
        public void GetBytesFromBytes()
        {
            byte[]            data   = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);

            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(data, byData);
        }
コード例 #3
0
        public void GetBytesFromString()
        {
            string            data   = "02030405";
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);

            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            byte[] veData = { 2, 3, 4, 5 };
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(veData, byData);
        }
コード例 #4
0
        public void ClearingForBytes()
        {
            byte[] data = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);
            Assert.IsNotNull(csData);

            csData.Clear();
            byte[] byData = csData.GetAsByteArray();
            Assert.IsNull(byData);
        }
コード例 #5
0
        public void GetBytesFromString()
        {
            string data = "02030405";
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);
            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            byte[] veData = { 2, 3, 4, 5 };
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(veData, byData);
        }
コード例 #6
0
        public void GetBytesFromBytes()
        {
            byte[] data = { 2, 3, 4, 5 };
            CheckSumDataCRC32 csData = new CheckSumDataCRC32(data);
            Assert.IsNotNull(csData);

            byte[] byData = csData.GetAsByteArray();
            Assert.IsNotNull(byData);
            Assert.AreEqual(byData.Length, CheckSumDataCRC32.Length);
            Assert.AreEqual(data, byData);
        }