Exemple #1
0
        public void CarPartsCompareCorrectly()
        {
            //Arrange
            CarPart a      = new Bolt(10f, 20f, Bolt.HeadType.ALEM, 5);
            CarPart b      = new Bolt(10f, 20f, Bolt.HeadType.ALEM, 15);
            CarPart c      = new Bolt(15f, 20f, Bolt.HeadType.HEX, 5);
            bool    result = false;

            //Act
            if (a == b && a.Equals(b))
            {
                if (b != c && a != c)
                {
                    result = true;
                }
            }

            //Assert
            Assert.IsTrue(result);
        }