public void CarBrandDoorTest9() { CarBrand brand = CreateCarBrand(100); BrandDoor door = new BrandDoor(1) { Name = "BrandDoor", OrderIndex = 10 }; brand.AddMyDoor(door); brand.AddMyDoor(door); AddCarBrand(brand); CheckDoorAssociatedCount(door.Id, 2); brand.RemoveMyDoor(door); UpdateCarBrand(brand); CheckDoorAssociatedCount(door.Id, 1); brand.RemoveMyDoor(door); UpdateCarBrand(brand); CheckExist(door.Id, false); }
public void CarBrandDoorTest13() { CarBrand brand = CreateCarBrand(100); BrandDoor door = new BrandDoor(1) { Name = "BrandDoor", OrderIndex = 10 }; brand.OneDoor = door; AddCarBrand(brand); CheckDoorAssociatedCount(door.Id, 1); brand.AddOtherDoor(door); UpdateCarBrand(brand); CheckDoorAssociatedCount(door.Id, 2); brand.AddMyDoor(door); UpdateCarBrand(brand); CheckDoorAssociatedCount(door.Id, 3); brand.OtherDoor = door; UpdateCarBrand(brand); CheckDoorAssociatedCount(door.Id, 4); }