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); }
public void AddingConflictingPartOnceShouldSucceed() { // when ExamplePart.AddConflictingPart(AnotherPart); // then ExamplePart.ConflictingParts.Should().Contain(AnotherPart); AnotherPart.ConflictingParts.Should().Contain(ExamplePart); }