示例#1
0
        public void SetUp()
        {
            ExamplePart     = new Part();
            ConflictingPart = new Part();
            ExampleCarModel = new CarModel(BodyType.Coupe, new DateTime(2017, 11, 10));
            ExampleCar      = new Car(ExampleCarModel);

            ExamplePart.AddConflictingPart(ConflictingPart);
            ExamplePart.AddSuitableModel(ExampleCarModel);
            ConflictingPart.AddSuitableModel(ExampleCarModel);
        }
示例#2
0
        public void AddingConflictingPartOnceShouldSucceed()
        {
            // when
            ExamplePart.AddConflictingPart(AnotherPart);

            // then
            ExamplePart.ConflictingParts.Should().Contain(AnotherPart);
            AnotherPart.ConflictingParts.Should().Contain(ExamplePart);
        }