コード例 #1
0
        public void GetDetailEqualOfTypesTest()
        {
            Bolt bolt = new Bolt();

            Assert.AreEqual(bolt.GetType(), checkerContainer.CreateDetail(new Bolt()).GetType());

            Screw screw = new Screw();

            Assert.AreEqual(screw.GetType(), checkerContainer.CreateDetail(new Screw()).GetType());

            Nail nail = new Nail();

            Assert.AreEqual(nail.GetType(), checkerContainer.CreateDetail(new Nail()).GetType());

            Wheel wheel = new Wheel();

            Assert.AreEqual(wheel.GetType(), checkerContainer.CreateDetail(new Wheel()).GetType());
        }