public void EqualsBothDifferentShouldReturnFalse()
        {
            BoolObstacleInformation test0 = new BoolObstacleInformation(0, true);
            BoolObstacleInformation test1 = new BoolObstacleInformation(1, false);

            Assert.That(!test0.Equals(test1));
        }
        public void EqualsACopyShouldReturnTrue()
        {
            BoolObstacleInformation test0 = new BoolObstacleInformation(0, true);
            BoolObstacleInformation test1 = new BoolObstacleInformation(0, true);

            Assert.That(test0.Equals(test1));
        }
Exemple #3
0
        public void DeserializeTestCaseShouldReturnExpected()
        {
            List <byte>             data         = data1();
            BoolObstacleInformation info         = serializer.Deserialize(data);
            BoolObstacleInformation expectedInfo = BoolObstacleInformation1;

            Assert.That(info.Equals(expectedInfo));
        }
Exemple #4
0
        public void SerializeTestCaseShouldReturnExpected()
        {
            BoolObstacleInformation info         = BoolObstacleInformation2;
            List <byte>             data         = serializer.Serialize(info);
            List <byte>             expectedData = data2();

            for (int i = 0; i < data.Count; i++)
            {
                Assert.AreEqual(data [i], expectedData [i]);
            }
        }
Exemple #5
0
        public void SerializeThenDeserializeShouldPreserveOriginal()
        {
            // Serialize some information
            BoolObstacleInformation info = BoolObstacleInformation1;
            List <byte>             data = serializer.Serialize(info);

            // Make sure the serializer isn't just spitting out the same thing
            Assert.That(!info.Equals(data));

            // Deserialize the result
            BoolObstacleInformation resultingInfo = serializer.Deserialize(data);

            // Check the information is the same as the original
            Assert.That(resultingInfo.Equals(info));
        }
        public void EqualsItselfShouldReturnTrue()
        {
            BoolObstacleInformation test = new BoolObstacleInformation(0, true);

            Assert.That(test.Equals(test));
        }
        public void EqualsNullShouldReturnFalse()
        {
            BoolObstacleInformation test = new BoolObstacleInformation(0, true);

            Assert.That(!test.Equals(null));
        }