"No","テストID","対象クラス","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-BLD-001","build.models.Build","save","正常系","BuildOrder保存時にreference_intが設定されること","有効なpartが存在","reference=""BO-0001""","reference_intが正しく設定される","高","参照番号の整数変換"
"2","UT-BLD-002","build.models.Build","save","正常系","新規作成時にdestinationがpartのデフォルトロケーションに設定されること","partにデフォルトロケーションが設定済み","destination=None","destination=part.get_default_location()","中","デフォルトロケーション自動設定"
"3","UT-BLD-003","build.models.Build","save","異常系","無効なBOMを持つpartでビルド作成が拒否されること","BUILDORDER_REQUIRE_VALID_BOM=True, part.is_bom_valid()=False","有効なpart","ValidationError(part: Assembly BOM has not been validated)","高","BOM検証"
"4","UT-BLD-004","build.models.Build","save","異常系","非アクティブなpartでビルド作成が拒否されること","BUILDORDER_REQUIRE_ACTIVE_PART=True, part.active=False","非アクティブなpart","ValidationError(part: Build order cannot be created for an inactive part)","高","アクティブpart検証"
"5","UT-BLD-005","build.models.Build","save","異常系","ロックされていないpartでビルド作成が拒否されること","BUILDORDER_REQUIRE_LOCKED_PART=True, part.locked=False","未ロックのpart","ValidationError(part: Build order cannot be created for an unlocked part)","中","ロック検証"
"6","UT-BLD-006","build.models.Build","clean","正常系","バリデーションが正常に完了すること","有効なBuild","適切な値","ValidationErrorなし","中","基本バリデーション"
"7","UT-BLD-007","build.models.Build","clean","異常系","external=Trueで購入不可partの場合エラーになること","external=True, part.purchaseable=False","purchaseable=Falseのpart","ValidationError(external: Build orders can only be externally fulfilled for purchaseable parts)","中","外部調達検証"
"8","UT-BLD-008","build.models.Build","clean","異常系","responsible未設定時にエラーになること","BUILDORDER_REQUIRE_RESPONSIBLE=True","responsible=None","ValidationError(responsible: Responsible user or group must be specified)","中","責任者必須検証"
"9","UT-BLD-009","build.models.Build","clean","異常系","part変更時にエラーになること","既存のBuild","partを変更","ValidationError(part: Build order part cannot be changed)","高","part変更禁止"
"10","UT-BLD-010","build.models.Build","clean","異常系","target_dateがstart_date以前の場合エラーになること","start_date設定済み","target_date < start_date","ValidationError(target_date: Target date must be after start date)","中","日付整合性検証"
"11","UT-BLD-011","build.models.Build","__str__","正常系","referenceが文字列として返されること","reference=""BO-0001""","なし","BO-0001","低","文字列表現"
"12","UT-BLD-012","build.models.Build","get_absolute_url","正常系","正しいURLが返されること","id=123","なし","/manufacturing/build-order/123が含まれるURL","低","URL生成"
"13","UT-BLD-013","build.models.Build","status_text","正常系","ステータスのテキスト表現が返されること","status=BuildStatus.PENDING.value","なし","Pending","低","ステータステキスト"
"14","UT-BLD-014","build.models.Build","sub_builds","正常系","cascade=Trueで全子孫ビルドが返されること","親ビルドに子ビルド・孫ビルドが存在","cascade=True","全子孫ビルドのQuerySet","中","子ビルド取得（カスケード）"
"15","UT-BLD-015","build.models.Build","sub_builds","正常系","cascade=Falseで直接の子ビルドのみ返されること","親ビルドに子ビルド・孫ビルドが存在","cascade=False","直接の子ビルドのみ","中","子ビルド取得（直接のみ）"
"16","UT-BLD-016","build.models.Build","sub_build_count","正常系","子ビルド数が正しく返されること","子ビルド3件存在","cascade=True","3","中","子ビルドカウント"
"17","UT-BLD-017","build.models.Build","has_open_child_builds","正常系","アクティブな子ビルドが存在する場合Trueが返されること","子ビルドがACTIVE状態","なし","True","中","オープン子ビルド判定"
"18","UT-BLD-018","build.models.Build","has_open_child_builds","正常系","アクティブな子ビルドが存在しない場合Falseが返されること","子ビルドがすべてCOMPLETE","なし","False","中","オープン子ビルド判定（なし）"
"19","UT-BLD-019","build.models.Build","is_overdue","正常系","期限超過の場合Trueが返されること","target_date=過去日, status=PENDING","なし","True","高","期限超過判定"
"20","UT-BLD-020","build.models.Build","is_overdue","正常系","期限内の場合Falseが返されること","target_date=未来日, status=PENDING","なし","False","高","期限超過判定（期限内）"
"21","UT-BLD-021","build.models.Build","active","正常系","ACTIVE_CODESステータスの場合Trueが返されること","status=BuildStatus.PENDING.value","なし","True","中","アクティブ判定"
"22","UT-BLD-022","build.models.Build","active","正常系","COMPLETE/CANCELLEDステータスの場合Falseが返されること","status=BuildStatus.COMPLETE.value","なし","False","中","アクティブ判定（非アクティブ）"
"23","UT-BLD-023","build.models.Build","tracked_line_items","正常系","トラッカブルなBOMラインが返されること","trackable=TrueのBomItemが存在","なし","trackable=TrueのBuildLineのQuerySet","中","トラッカブルライン取得"
"24","UT-BLD-024","build.models.Build","has_tracked_line_items","正常系","トラッカブルなBOMラインが存在する場合Trueが返されること","trackable=TrueのBomItemが存在","なし","True","中","トラッカブルライン存在判定"
"25","UT-BLD-025","build.models.Build","untracked_line_items","正常系","非トラッカブルなBOMラインが返されること","trackable=FalseのBomItemが存在","なし","trackable=FalseのBuildLineのQuerySet","中","非トラッカブルライン取得"
"26","UT-BLD-026","build.models.Build","are_untracked_parts_allocated","正常系","非トラッカブルパーツが全て割当済みの場合Trueが返されること","全ての非トラッカブルパーツが割当済み","なし","True","高","非トラッカブル割当完了判定"
"27","UT-BLD-027","build.models.Build","remaining","正常系","残り数量が正しく計算されること","quantity=10, completed=3","なし","7","高","残数量計算"
"28","UT-BLD-028","build.models.Build","remaining","境界値","completed > quantityの場合0が返されること","quantity=10, completed=15","なし","0","中","残数量計算（超過）"
"29","UT-BLD-029","build.models.Build","output_count","正常系","ビルド出力数が正しく返されること","build_outputsが3件存在","なし","3","中","出力カウント"
"30","UT-BLD-030","build.models.Build","has_build_outputs","正常系","ビルド出力が存在する場合Trueが返されること","build_outputsが1件以上存在","なし","True","中","出力存在判定"
"31","UT-BLD-031","build.models.Build","has_build_outputs","正常系","ビルド出力が存在しない場合Falseが返されること","build_outputsが0件","なし","False","中","出力存在判定（なし）"
"32","UT-BLD-032","build.models.Build","get_build_outputs","正常系","全ビルド出力が返されること","複数のビルド出力が存在","キーワード引数なし","全ビルド出力のQuerySet","中","出力取得"
"33","UT-BLD-033","build.models.Build","get_build_outputs","正常系","in_stock=Trueで在庫中の出力のみ返されること","在庫中と在庫外の出力が存在","in_stock=True","在庫中の出力のみ","中","出力取得（在庫フィルタ）"
"34","UT-BLD-034","build.models.Build","get_build_outputs","正常系","complete=Trueで完了した出力のみ返されること","完了と未完了の出力が存在","complete=True","完了した出力のみ（is_building=False）","中","出力取得（完了フィルタ）"
"35","UT-BLD-035","build.models.Build","complete_outputs","正常系","完了した出力が返されること","is_building=Falseの出力が存在","なし","完了した出力のQuerySet","中","完了出力取得"
"36","UT-BLD-036","build.models.Build","complete_count","正常系","完了した出力の合計数量が返されること","完了出力が複数存在（quantity合計=15）","なし","15","高","完了数量計算"
"37","UT-BLD-037","build.models.Build","is_partially_allocated","正常系","一部でも割当がある場合Trueが返されること","allocated_stockが1件以上存在","なし","True","中","部分割当判定"
"38","UT-BLD-038","build.models.Build","incomplete_outputs","正常系","未完了の出力が返されること","is_building=Trueの出力が存在","なし","未完了の出力のQuerySet","中","未完了出力取得"
"39","UT-BLD-039","build.models.Build","incomplete_count","正常系","未完了の出力の合計数量が返されること","未完了出力が複数存在（quantity合計=8）","なし","8","高","未完了数量計算"
"40","UT-BLD-040","build.models.Build","getNextBuildNumber","正常系","次のビルド番号が予測されること","既存ビルドが存在","なし","インクリメントされた参照番号","中","次番号予測"
"41","UT-BLD-041","build.models.Build","getNextBuildNumber","境界値","ビルドが0件の場合Noneが返されること","ビルドが0件","なし","None","低","次番号予測（空）"
"42","UT-BLD-042","build.models.Build","can_complete","正常系","完了可能な状態でTrueが返されること","status=PRODUCTION, incomplete_count=0, remaining=0, fully_allocated=True","なし","True","高","完了可能判定"
"43","UT-BLD-043","build.models.Build","can_complete","正常系","status!=PRODUCTIONの場合Falseが返されること","status=PENDING","なし","False","高","完了可能判定（ステータス不正）"
"44","UT-BLD-044","build.models.Build","can_complete","正常系","未完了出力がある場合Falseが返されること","incomplete_count > 0","なし","False","高","完了可能判定（未完了出力あり）"
"45","UT-BLD-045","build.models.Build","can_complete","正常系","残り数量がある場合Falseが返されること","remaining > 0","なし","False","高","完了可能判定（残りあり）"
"46","UT-BLD-046","build.models.Build","can_complete","正常系","オープン子ビルドがある場合Falseが返されること","BUILDORDER_REQUIRE_CLOSED_CHILDS=True, has_open_child_builds=True","なし","False","中","完了可能判定（子ビルド未完了）"
"47","UT-BLD-047","build.models.Build","complete_build","正常系","ビルドが正常に完了すること","完了可能な状態","user, trim_allocated_stock=False","status=COMPLETE, completion_date設定, completed_by設定","高","ビルド完了"
"48","UT-BLD-048","build.models.Build","complete_build","異常系","オープン子ビルドがある場合エラーになること","BUILDORDER_REQUIRE_CLOSED_CHILDS=True, オープン子ビルドあり","user","ValidationError","高","完了エラー（子ビルド）"
"49","UT-BLD-049","build.models.Build","complete_build","異常系","未完了出力がある場合エラーになること","incomplete_count > 0","user","ValidationError","高","完了エラー（未完了出力）"
"50","UT-BLD-050","build.models.Build","issue_build","正常系","ビルドがPRODUCTION状態に遷移すること","status=PENDING","なし","status=BuildStatus.PRODUCTION.value","高","ビルド発行"
"51","UT-BLD-051","build.models.Build","can_issue","正常系","PENDING状態でTrueが返されること","status=PENDING","なし","True","中","発行可能判定"
"52","UT-BLD-052","build.models.Build","can_issue","正常系","ON_HOLD状態でTrueが返されること","status=ON_HOLD","なし","True","中","発行可能判定（保留）"
"53","UT-BLD-053","build.models.Build","can_issue","正常系","PRODUCTION状態でFalseが返されること","status=PRODUCTION","なし","False","中","発行可能判定（既に発行済み）"
"54","UT-BLD-054","build.models.Build","hold_build","正常系","ビルドがON_HOLD状態に遷移すること","status=PRODUCTION","なし","status=BuildStatus.ON_HOLD.value","中","ビルド保留"
"55","UT-BLD-055","build.models.Build","can_hold","正常系","PENDING状態でTrueが返されること","status=PENDING","なし","True","中","保留可能判定"
"56","UT-BLD-056","build.models.Build","can_hold","正常系","PRODUCTION状態でTrueが返されること","status=PRODUCTION","なし","True","中","保留可能判定（製造中）"
"57","UT-BLD-057","build.models.Build","can_hold","正常系","COMPLETE状態でFalseが返されること","status=COMPLETE","なし","False","中","保留可能判定（完了済み）"
"58","UT-BLD-058","build.models.Build","cancel_build","正常系","ビルドがCANCELLED状態に遷移すること","status=PRODUCTION","user","status=BuildStatus.CANCELLED.value, completion_date設定","高","ビルドキャンセル"
"59","UT-BLD-059","build.models.Build","cancel_build","正常系","remove_allocated_stock=Trueで割当在庫が消費されること","割当在庫が存在","user, remove_allocated_stock=True","割当在庫が消費される","中","キャンセル（在庫消費）"
"60","UT-BLD-060","build.models.Build","cancel_build","正常系","remove_incomplete_outputs=Trueで未完了出力が削除されること","未完了出力が存在","user, remove_incomplete_outputs=True","未完了出力が削除される","中","キャンセル（出力削除）"
"61","UT-BLD-061","build.models.Build","deallocate_stock","正常系","指定した出力の割当が解除されること","outputに対する割当が存在","output=特定のStockItem","該当する割当が削除される","中","割当解除"
"62","UT-BLD-062","build.models.Build","deallocate_stock","正常系","指定したbuild_lineの割当が解除されること","build_lineに対する割当が存在","build_line=特定のBuildLine","該当する割当が削除される","中","割当解除（ライン指定）"
"63","UT-BLD-063","build.models.Build","create_build_output","正常系","ビルド出力が作成されること","有効なBuild","quantity=5","StockItemが作成される（is_building=True）","高","出力作成"
"64","UT-BLD-064","build.models.Build","create_build_output","正常系","シリアル番号付きで複数出力が作成されること","trackable=Trueのpart","quantity=3, serials=[""SN001"", ""SN002"", ""SN003""]","3件のStockItemが作成される","高","シリアル出力作成"
"65","UT-BLD-065","build.models.Build","create_build_output","正常系","auto_allocate=Trueで自動割当が行われること","マッチするシリアルの在庫が存在","auto_allocate=True, serials設定","マッチする在庫が自動割当される","中","自動割当付き出力作成"
"66","UT-BLD-066","build.models.Build","create_build_output","異常系","trackableパーツでシリアル未指定の場合エラーになること","has_trackable_parts=True","serials=None","ValidationError(serials: Serial numbers must be provided for trackable parts)","高","シリアル必須エラー"
"67","UT-BLD-067","build.models.Build","create_build_output","正常系","PENDING状態からPRODUCTIONに自動遷移すること","status=PENDING","quantity=1","status=BuildStatus.PRODUCTION.value","中","自動ステータス遷移"
"68","UT-BLD-068","build.models.Build","delete_output","正常系","ビルド出力が削除されること","is_building=Trueの出力が存在","output=対象StockItem","出力が削除され、関連割当も削除される","中","出力削除"
"69","UT-BLD-069","build.models.Build","delete_output","異常系","出力がNoneの場合エラーになること","なし","output=None","ValidationError(No build output specified)","中","出力削除エラー（null）"
"70","UT-BLD-070","build.models.Build","delete_output","異常系","既に完了した出力の場合エラーになること","is_building=Falseの出力","output=完了済み出力","ValidationError(Build output is already completed)","中","出力削除エラー（完了済み）"
"71","UT-BLD-071","build.models.Build","delete_output","異常系","別ビルドの出力の場合エラーになること","別ビルドの出力","output=別ビルドの出力","ValidationError(Build output does not match Build Order)","中","出力削除エラー（別ビルド）"
"72","UT-BLD-072","build.models.Build","trim_allocated_stock","正常系","過剰割当が削減されること","allocated > requiredのBuildLineが存在","なし","割当数量がrequiredに削減される","中","過剰割当削減"
"73","UT-BLD-073","build.models.Build","allocated_stock","正常系","割当されたBuildItemが返されること","BuildItemが存在","なし","BuildItemのQuerySet","中","割当在庫取得"
"74","UT-BLD-074","build.models.Build","subtract_allocated_stock","正常系","非トラッカブル割当在庫が消費されること","非トラッカブルの割当在庫が存在","user","割当在庫が消費（complete_allocation呼び出し）","高","割当在庫消費"
"75","UT-BLD-075","build.models.Build","scrap_build_output","正常系","出力がスクラップ処理されること","有効な出力が存在","output, quantity, location","出力がREJECTED状態になる","中","出力スクラップ"
"76","UT-BLD-076","build.models.Build","scrap_build_output","正常系","部分数量のスクラップで分割されること","quantity=10の出力が存在","quantity=3, location","出力が分割され、3のみスクラップ","中","部分スクラップ"
"77","UT-BLD-077","build.models.Build","scrap_build_output","異常系","quantity <= 0の場合エラーになること","有効な出力が存在","quantity=0","ValidationError(quantity: Quantity must be greater than zero)","中","スクラップエラー（数量）"
"78","UT-BLD-078","build.models.Build","scrap_build_output","異常系","quantity > output.quantityの場合エラーになること","quantity=5の出力が存在","quantity=10","ValidationError(quantity: Quantity cannot be greater than the output quantity)","中","スクラップエラー（超過）"
"79","UT-BLD-079","build.models.Build","complete_build_output","正常系","出力が正常に完了すること","有効な出力、割当完了","output, user","is_building=False, completed増加","高","出力完了"
"80","UT-BLD-080","build.models.Build","complete_build_output","正常系","部分数量の完了で分割されること","quantity=10の出力","quantity=3, user","出力が分割され、3のみ完了","中","部分完了"
"81","UT-BLD-081","build.models.Build","complete_build_output","異常系","テスト未通過の場合エラーになること","prevent_on_incomplete=True, 必須テスト未通過","output, user","ValidationError(Build output has not passed all required tests)","高","完了エラー（テスト）"
"82","UT-BLD-082","build.models.Build","complete_build_output","異常系","割当ありで部分完了の場合エラーになること","allocated_items > 0","quantity < output.quantity","ValidationError(Cannot partially complete a build output with allocated items)","中","部分完了エラー（割当あり）"
"83","UT-BLD-083","build.models.Build","auto_allocate_stock","正常系","在庫が自動割当されること","有効な在庫が存在","なし","BuildItemが作成される","高","自動割当"
"84","UT-BLD-084","build.models.Build","auto_allocate_stock","正常系","location指定で場所フィルタが適用されること","特定場所に在庫が存在","location=特定場所","指定場所の在庫のみ割当","中","自動割当（場所指定）"
"85","UT-BLD-085","build.models.Build","auto_allocate_stock","正常系","exclude_location指定で除外されること","除外場所に在庫が存在","exclude_location=除外場所","除外場所の在庫は割当されない","中","自動割当（場所除外）"
"86","UT-BLD-086","build.models.Build","auto_allocate_stock","正常系","interchangeable=Trueで複数在庫から割当されること","複数場所に在庫が存在","interchangeable=True","複数場所から割当","中","自動割当（交換可能）"
"87","UT-BLD-087","build.models.Build","auto_allocate_stock","正常系","substitutes=Trueで代替品も割当されること","代替品の在庫が存在","substitutes=True","代替品も割当対象","中","自動割当（代替品）"
"88","UT-BLD-088","build.models.Build","auto_allocate_stock","正常系","consumableアイテムは割当されないこと","consumable=TrueのBomItemが存在","なし","consumableアイテムは割当されない","中","自動割当（消耗品除外）"
"89","UT-BLD-089","build.models.Build","unallocated_lines","正常系","未割当のラインが返されること","一部ラインが未割当","tracked=None","未割当ラインのQuerySet","中","未割当ライン取得"
"90","UT-BLD-090","build.models.Build","unallocated_lines","正常系","tracked=Trueでトラッカブル未割当のみ返されること","トラッカブル・非トラッカブルの未割当が存在","tracked=True","トラッカブルの未割当のみ","中","未割当ライン取得（トラッカブル）"
"91","UT-BLD-091","build.models.Build","is_fully_allocated","正常系","全割当完了の場合Trueが返されること","全ラインが割当完了","tracked=None","True","高","全割当完了判定"
"92","UT-BLD-092","build.models.Build","is_fully_allocated","正常系","未割当がある場合Falseが返されること","一部ラインが未割当","tracked=None","False","高","全割当完了判定（未完了）"
"93","UT-BLD-093","build.models.Build","is_output_fully_allocated","正常系","出力が完全割当の場合Trueが返されること","出力への割当が完了","output=特定出力","True","高","出力割当完了判定"
"94","UT-BLD-094","build.models.Build","is_output_fully_allocated","正常系","出力が未割当の場合Falseが返されること","出力への割当が不完全","output=特定出力","False","高","出力割当完了判定（未完了）"
"95","UT-BLD-095","build.models.Build","is_overallocated","正常系","過剰割当がある場合Trueが返されること","allocated > requiredのラインが存在","なし","True","中","過剰割当判定"
"96","UT-BLD-096","build.models.Build","is_overallocated","正常系","過剰割当がない場合Falseが返されること","全ライン allocated <= required","なし","False","中","過剰割当判定（なし）"
"97","UT-BLD-097","build.models.Build","is_active","正常系","ACTIVE_CODESの場合Trueが返されること","status=PENDING","なし","True","中","アクティブ判定"
"98","UT-BLD-098","build.models.Build","is_complete","正常系","COMPLETE状態の場合Trueが返されること","status=COMPLETE","なし","True","中","完了判定"
"99","UT-BLD-099","build.models.Build","create_build_line_items","正常系","BOMアイテムに対応するBuildLineが作成されること","partに複数BomItemが存在","prevent_duplicates=True","BomItem数分のBuildLineが作成される","高","BuildLine作成"
"100","UT-BLD-100","build.models.Build","create_build_line_items","正常系","重複防止で既存ラインはスキップされること","既にBuildLineが存在","prevent_duplicates=True","既存ラインはスキップ、新規のみ作成","中","BuildLine作成（重複防止）"
"101","UT-BLD-101","build.models.Build","update_build_line_items","正常系","BuildLineの数量が更新されること","quantityが変更されたBuild","なし","各BuildLineのquantityが再計算される","中","BuildLine更新"
"102","UT-BLD-102","build.models.BuildLine","part","正常系","bom_item.sub_partが返されること","有効なBuildLine","なし","bom_item.sub_part","低","パーツ取得"
"103","UT-BLD-103","build.models.BuildLine","allocated_quantity","正常系","割当数量の合計が返されること","複数のallocationsが存在（合計=15）","なし","15","高","割当数量計算"
"104","UT-BLD-104","build.models.BuildLine","allocated_quantity","境界値","allocationsが0件の場合0が返されること","allocationsが0件","なし","0","中","割当数量計算（空）"
"105","UT-BLD-105","build.models.BuildLine","unallocated_quantity","正常系","未割当数量が正しく計算されること","quantity=10, consumed=2, allocated=3","なし","5 (10-2-3)","高","未割当数量計算"
"106","UT-BLD-106","build.models.BuildLine","unallocated_quantity","境界値","負の値の場合0が返されること","quantity=10, consumed=5, allocated=8","なし","0","中","未割当数量計算（負値防止）"
"107","UT-BLD-107","build.models.BuildLine","is_fully_allocated","正常系","完全割当の場合Trueが返されること","allocated >= quantity - consumed","なし","True","高","完全割当判定"
"108","UT-BLD-108","build.models.BuildLine","is_fully_allocated","正常系","consumableの場合常にTrueが返されること","bom_item.consumable=True","なし","True","中","完全割当判定（消耗品）"
"109","UT-BLD-109","build.models.BuildLine","is_fully_allocated","正常系","未割当がある場合Falseが返されること","allocated < quantity - consumed","なし","False","高","完全割当判定（未完了）"
"110","UT-BLD-110","build.models.BuildLine","is_overallocated","正常系","過剰割当の場合Trueが返されること","allocated > quantity - consumed","なし","True","中","過剰割当判定"
"111","UT-BLD-111","build.models.BuildLine","is_overallocated","正常系","過剰割当でない場合Falseが返されること","allocated <= quantity - consumed","なし","False","中","過剰割当判定（なし）"
"112","UT-BLD-112","build.models.BuildLine","is_fully_consumed","正常系","完全消費の場合Trueが返されること","consumed >= quantity","なし","True","中","完全消費判定"
"113","UT-BLD-113","build.models.BuildLine","is_fully_consumed","正常系","未消費がある場合Falseが返されること","consumed < quantity","なし","False","中","完全消費判定（未完了）"
"114","UT-BLD-114","build.models.BuildItem","save","正常系","clean後にsaveされること","有効なBuildItem","なし","正常に保存される","中","BuildItem保存"
"115","UT-BLD-115","build.models.BuildItem","clean","正常系","バリデーションが正常に完了すること","有効なBuildItem","なし","ValidationErrorなし","中","BuildItemバリデーション"
"116","UT-BLD-116","build.models.BuildItem","clean","異常系","trackableパーツでinstall_into未設定の場合エラーになること","stock_item.part.trackable=True, install_into=None","なし","ValidationError(Build item must specify a build output...)","高","trackable出力必須エラー"
"117","UT-BLD-117","build.models.BuildItem","clean","異常系","stock_itemがBOMに合致しない場合エラーになること","BOMに含まれないパーツのstock_item","なし","ValidationError(stock_item: Selected stock item does not match BOM line)","高","BOM不一致エラー"
"118","UT-BLD-118","build.models.BuildItem","check_allocated_quantity","正常系","有効な数量でエラーなしになること","quantity > 0, quantity <= stock_item.quantity","raise_error=True","エラーなし","高","数量検証"
"119","UT-BLD-119","build.models.BuildItem","check_allocated_quantity","異常系","quantity <= 0の場合エラーになること","quantity=0","raise_error=True","ValidationError(quantity: Allocated quantity must be greater than zero)","高","数量検証（ゼロ以下）"
"120","UT-BLD-120","build.models.BuildItem","check_allocated_quantity","異常系","シリアル在庫でquantity != 1の場合エラーになること","stock_item.serialized=True, quantity=2","raise_error=True","ValidationError(quantity: Quantity must be 1 for serialized stock)","高","シリアル数量検証"
"121","UT-BLD-121","build.models.BuildItem","check_allocated_quantity","異常系","quantity > stock_item.quantityの場合エラーになること","quantity=10, stock_item.quantity=5","raise_error=True","ValidationError(quantity: Allocated quantity must not exceed available stock quantity)","高","数量超過検証"
"122","UT-BLD-122","build.models.BuildItem","check_allocated_quantity","異常系","過剰割当の場合エラーになること","total_allocation > available","raise_error=True","ValidationError(quantity: Stock item is over-allocated)","高","過剰割当検証"
"123","UT-BLD-123","build.models.BuildItem","build","正常系","build_line.buildが返されること","有効なbuild_line","なし","関連するBuild","低","ビルド取得"
"124","UT-BLD-124","build.models.BuildItem","build","境界値","build_lineがNoneの場合Noneが返されること","build_line=None","なし","None","低","ビルド取得（null）"
"125","UT-BLD-125","build.models.BuildItem","bom_item","正常系","build_line.bom_itemが返されること","有効なbuild_line","なし","関連するBomItem","低","BomItem取得"
"126","UT-BLD-126","build.models.BuildItem","complete_allocation","正常系","トラッカブルパーツがインストールされること","stock_item.part.trackable=True, install_into設定","user","stock_itemがinstall_intoにインストールされる","高","割当完了（トラッカブル）"
"127","UT-BLD-127","build.models.BuildItem","complete_allocation","正常系","非トラッカブルパーツが消費されること","stock_item.part.trackable=False","user","stock_itemがconsumed_byに設定、location=None","高","割当完了（非トラッカブル）"
"128","UT-BLD-128","build.models.BuildItem","complete_allocation","正常系","部分数量で在庫が分割されること","quantity < stock_item.quantity","quantity=3, user","在庫が分割され、3のみ消費","中","部分割当完了"
"129","UT-BLD-129","build.models.BuildItem","complete_allocation","正常系","build_line.consumedが増加すること","有効なBuildItem","user","build_line.consumed += quantity","高","消費数量更新"
"130","UT-BLD-130","build.models.BuildItem","complete_allocation","正常系","quantity=0になったBuildItemが削除されること","割当完了後quantity=0","user","BuildItemが削除される","中","割当完了後削除"
"131","UT-BLD-131","build.status_codes.BuildStatus","PENDING","正常系","PENDING値が10であること","なし","なし","10","低","ステータスコード値"
"132","UT-BLD-132","build.status_codes.BuildStatus","PRODUCTION","正常系","PRODUCTION値が20であること","なし","なし","20","低","ステータスコード値"
"133","UT-BLD-133","build.status_codes.BuildStatus","ON_HOLD","正常系","ON_HOLD値が25であること","なし","なし","25","低","ステータスコード値"
"134","UT-BLD-134","build.status_codes.BuildStatus","CANCELLED","正常系","CANCELLED値が30であること","なし","なし","30","低","ステータスコード値"
"135","UT-BLD-135","build.status_codes.BuildStatus","COMPLETE","正常系","COMPLETE値が40であること","なし","なし","40","低","ステータスコード値"
"136","UT-BLD-136","build.status_codes.BuildStatusGroups","ACTIVE_CODES","正常系","アクティブコードが正しく定義されていること","なし","なし","[10, 25, 20]（PENDING, ON_HOLD, PRODUCTION）","中","アクティブコード定義"
"137","UT-BLD-137","build.validators.generate_next_build_reference","","正常系","次のビルド参照番号が生成されること","既存ビルドが存在","なし","Build.generate_reference()の結果","中","参照番号生成"
"138","UT-BLD-138","build.validators.validate_build_order_reference_pattern","","正常系","有効なパターンでエラーなしになること","有効なパターン","pattern=""BO-{####}""","エラーなし","中","パターン検証"
"139","UT-BLD-139","build.validators.validate_build_order_reference","","正常系","有効な参照番号でエラーなしになること","有効な参照番号","value=""BO-0001""","エラーなし","中","参照番号検証"
"140","UT-BLD-140","build.tasks.auto_allocate_build","","正常系","ビルドの自動割当が実行されること","有効なbuild_id","build_id","build_order.auto_allocate_stock()が呼ばれる","中","自動割当タスク"
"141","UT-BLD-141","build.tasks.auto_allocate_build","","異常系","存在しないbuild_idで警告ログが出力されること","存在しないbuild_id","build_id=999999","警告ログ出力、処理終了","低","自動割当タスク（不存在）"
"142","UT-BLD-142","build.tasks.consume_build_item","","正常系","BuildItemの消費が実行されること","有効なitem_id","item_id, quantity, notes, user_id","item.complete_allocation()が呼ばれる","中","アイテム消費タスク"
"143","UT-BLD-143","build.tasks.consume_build_item","","異常系","存在しないitem_idで警告ログが出力されること","存在しないitem_id","item_id=999999","警告ログ出力、処理終了","低","アイテム消費タスク（不存在）"
"144","UT-BLD-144","build.tasks.consume_build_line","","正常系","BuildLineの全割当が消費されること","有効なline_id、複数allocations","line_id, notes, user_id","全allocationsのcomplete_allocation()が呼ばれる","中","ライン消費タスク"
"145","UT-BLD-145","build.tasks.consume_build_line","","異常系","存在しないline_idで警告ログが出力されること","存在しないline_id","line_id=999999","警告ログ出力、処理終了","低","ライン消費タスク（不存在）"
"146","UT-BLD-146","build.tasks.complete_build_allocations","","正常系","ビルドの割当完了が実行されること","有効なbuild_id, user_id","build_id, user_id","build_order.complete_allocations()が呼ばれる","中","割当完了タスク"
"147","UT-BLD-147","build.tasks.complete_build_allocations","","異常系","存在しないbuild_idで警告ログが出力されること","存在しないbuild_id","build_id=999999, user_id","警告ログ出力、処理終了","低","割当完了タスク（不存在）"
"148","UT-BLD-148","build.tasks.update_build_order_lines","","正常系","BomItem更新でBuildLineが更新されること","有効なbom_item_pk、関連ビルドが存在","bom_item_pk","関連BuildLineのquantityが更新される","中","ライン更新タスク"
"149","UT-BLD-149","build.tasks.update_build_order_lines","","正常系","virtualパーツの場合BuildLineが削除されること","bom_item.sub_part.virtual=True","bom_item_pk","BuildLineが削除される","中","ライン更新タスク（virtual）"
"150","UT-BLD-150","build.tasks.update_build_order_lines","","正常系","存在しないBomItemで早期リターンすること","削除されたBomItem","bom_item_pk=削除済み","処理終了（何もしない）","低","ライン更新タスク（不存在）"
"151","UT-BLD-151","build.tasks.check_build_stock","","正常系","在庫不足時に通知が送信されること","必要在庫が不足しているビルド","build","trigger_notificationが呼ばれる","中","在庫チェックタスク"
"152","UT-BLD-152","build.tasks.check_build_stock","","正常系","在庫充足時に通知が送信されないこと","必要在庫が充足しているビルド","build","通知なし、早期リターン","中","在庫チェックタスク（充足）"
"153","UT-BLD-153","build.tasks.notify_overdue_build_order","","正常系","期限超過通知が送信されること","有効な期限超過ビルド","bo","trigger_notificationが呼ばれる","中","期限超過通知タスク"
"154","UT-BLD-154","build.tasks.check_overdue_build_orders","","正常系","昨日期限超過になったビルドに通知が送信されること","target_date=昨日のアクティブビルドが存在","なし","該当ビルドにnotify_overdue_build_orderが呼ばれる","中","期限超過チェックタスク"
"155","UT-BLD-155","build.filters.annotate_required_quantity","","正常系","必要数量アノテーションが正しく計算されること","quantity=10, consumed=3のBuildLine","なし","7（Greatest(quantity - consumed, 0)）","中","必要数量アノテーション"
"156","UT-BLD-156","build.filters.annotate_required_quantity","","境界値","consumed > quantityの場合0が返されること","quantity=5, consumed=8のBuildLine","なし","0","中","必要数量アノテーション（超過）"
"157","UT-BLD-157","build.filters.annotate_allocated_quantity","","正常系","割当数量アノテーションが正しく計算されること","allocations合計=15のBuildLine","なし","15","中","割当数量アノテーション"
"158","UT-BLD-158","build.filters.annotate_allocated_quantity","","境界値","allocationsが0件の場合0が返されること","allocationsが0件のBuildLine","なし","0","中","割当数量アノテーション（空）"
"159","UT-BLD-159","build.events.BuildEvents","HOLD","正常系","HOLDイベント値が正しいこと","なし","なし","build.hold","低","イベント値"
"160","UT-BLD-160","build.events.BuildEvents","ISSUED","正常系","ISSUEDイベント値が正しいこと","なし","なし","build.issued","低","イベント値"
"161","UT-BLD-161","build.events.BuildEvents","CANCELLED","正常系","CANCELLEDイベント値が正しいこと","なし","なし","build.cancelled","低","イベント値"
"162","UT-BLD-162","build.events.BuildEvents","COMPLETED","正常系","COMPLETEDイベント値が正しいこと","なし","なし","build.completed","低","イベント値"
"163","UT-BLD-163","build.events.BuildEvents","OVERDUE","正常系","OVERDUEイベント値が正しいこと","なし","なし","build.overdue_build_order","低","イベント値"
"164","UT-BLD-164","build.events.BuildEvents","OUTPUT_COMPLETED","正常系","OUTPUT_COMPLETEDイベント値が正しいこと","なし","なし","buildoutput.completed","低","イベント値"
"165","UT-BLD-165","build.serializers.BuildSerializer","validate_reference","正常系","有効な参照番号でバリデーション成功すること","有効な参照番号","reference=""BO-0001""","reference=""BO-0001""","中","シリアライザバリデーション"
"166","UT-BLD-166","build.serializers.BuildSerializer","annotate_queryset","正常系","overdueアノテーションが追加されること","期限超過のビルドが存在","queryset","overdue=True/Falseがアノテーションされる","中","クエリセットアノテーション"
"167","UT-BLD-167","build.serializers.BuildOutputSerializer","validate_output","正常系","有効な出力でバリデーション成功すること","output.build==context[build]","output=有効なStockItem","バリデーション成功","中","出力バリデーション"
"168","UT-BLD-168","build.serializers.BuildOutputSerializer","validate_output","異常系","別ビルドの出力でエラーになること","output.build!=context[build]","output=別ビルドの出力","ValidationError(Build output does not match the parent build)","中","出力バリデーション（不一致）"
"169","UT-BLD-169","build.serializers.BuildOutputSerializer","validate_output","異常系","パーツ不一致でエラーになること","output.part!=build.part","output=別パーツの出力","ValidationError(Output part does not match BuildOrder part)","中","出力バリデーション（パーツ不一致）"
"170","UT-BLD-170","build.serializers.BuildOutputSerializer","validate_output","異常系","既に完了した出力でエラーになること","output.is_building=False","output=完了済み出力","ValidationError(This build output has already been completed)","中","出力バリデーション（完了済み）"
"171","UT-BLD-171","build.serializers.BuildOutputCreateSerializer","validate_quantity","正常系","有効な数量でバリデーション成功すること","quantity > 0","quantity=5","quantity=5","中","数量バリデーション"
"172","UT-BLD-172","build.serializers.BuildOutputCreateSerializer","validate_quantity","異常系","quantity <= 0でエラーになること","quantity <= 0","quantity=0","ValidationError(Quantity must be greater than zero)","中","数量バリデーション（ゼロ以下）"
"173","UT-BLD-173","build.serializers.BuildOutputCreateSerializer","validate_quantity","異常系","trackableパーツで非整数の場合エラーになること","part.trackable=True","quantity=1.5","ValidationError(Integer quantity required for trackable parts)","中","数量バリデーション（非整数）"
"174","UT-BLD-174","build.serializers.BuildOutputCreateSerializer","validate","正常系","シリアル番号が正しく抽出されること","trackableパーツ","serial_numbers=""1-3"", quantity=3","self.serials=[""1"", ""2"", ""3""]","中","シリアル番号抽出"
"175","UT-BLD-175","build.serializers.BuildOutputCreateSerializer","validate","異常系","trackableパーツでシリアル未指定の場合エラーになること","part.trackable=True","serial_numbers=""""","ValidationError(serial_numbers: Serial numbers must be provided for trackable parts)","高","シリアル必須エラー"
"176","UT-BLD-176","build.serializers.BuildOutputCreateSerializer","validate","異常系","重複シリアル番号でエラーになること","既に使用されているシリアル番号","serial_numbers=""存在するシリアル""","ValidationError(serial_numbers: The following serial numbers already exist or are invalid)","高","シリアル重複エラー"
"177","UT-BLD-177","build.serializers.BuildCompleteSerializer","validate_accept_overallocated","正常系","過剰割当許可でバリデーション成功すること","is_overallocated=True","accept_overallocated=ACCEPT","バリデーション成功","中","過剰割当バリデーション"
"178","UT-BLD-178","build.serializers.BuildCompleteSerializer","validate_accept_overallocated","異常系","過剰割当拒否でエラーになること","is_overallocated=True","accept_overallocated=REJECT","ValidationError(Some stock items have been overallocated)","中","過剰割当バリデーション（拒否）"
"179","UT-BLD-179","build.serializers.BuildCompleteSerializer","validate_accept_unallocated","正常系","未割当許可でバリデーション成功すること","fully_allocated=False","accept_unallocated=True","バリデーション成功","中","未割当バリデーション"
"180","UT-BLD-180","build.serializers.BuildCompleteSerializer","validate_accept_unallocated","異常系","未割当拒否でエラーになること","fully_allocated=False","accept_unallocated=False","ValidationError(Required stock has not been fully allocated)","中","未割当バリデーション（拒否）"
"181","UT-BLD-181","build.serializers.BuildCompleteSerializer","validate_accept_incomplete","正常系","未完了許可でバリデーション成功すること","remaining > 0","accept_incomplete=True","バリデーション成功","中","未完了バリデーション"
"182","UT-BLD-182","build.serializers.BuildCompleteSerializer","validate_accept_incomplete","異常系","未完了拒否でエラーになること","remaining > 0","accept_incomplete=False","ValidationError(Required build quantity has not been completed)","中","未完了バリデーション（拒否）"
"183","UT-BLD-183","build.serializers.BuildCompleteSerializer","validate","異常系","オープン子ビルドがある場合エラーになること","BUILDORDER_REQUIRE_CLOSED_CHILDS=True, has_open_child_builds=True","なし","ValidationError(Build order has open child build orders)","中","完了バリデーション（子ビルド）"
"184","UT-BLD-184","build.serializers.BuildCompleteSerializer","validate","異常系","status!=PRODUCTIONでエラーになること","status=PENDING","なし","ValidationError(Build order must be in production state)","中","完了バリデーション（ステータス）"
"185","UT-BLD-185","build.serializers.BuildAllocationItemSerializer","validate_build_line","正常系","有効なbuild_lineでバリデーション成功すること","build_line.bom_item.part==build.part","build_line=有効なBuildLine","バリデーション成功","中","BuildLineバリデーション"
"186","UT-BLD-186","build.serializers.BuildAllocationItemSerializer","validate_build_line","異常系","パーツ不一致でエラーになること","build_line.bom_item.part!=build.part, inherited=False","build_line=不一致BuildLine","ValidationError(bom_item.part must point to the same part as the build order)","中","BuildLineバリデーション（不一致）"
"187","UT-BLD-187","build.serializers.BuildAllocationItemSerializer","validate_stock_item","正常系","在庫中のstock_itemでバリデーション成功すること","stock_item.in_stock=True","stock_item=在庫中アイテム","バリデーション成功","中","StockItemバリデーション"
"188","UT-BLD-188","build.serializers.BuildAllocationItemSerializer","validate_stock_item","異常系","在庫外のstock_itemでエラーになること","stock_item.in_stock=False","stock_item=在庫外アイテム","ValidationError(Item must be in stock)","中","StockItemバリデーション（在庫外）"
"189","UT-BLD-189","build.serializers.BuildAllocationItemSerializer","validate_quantity","正常系","有効な数量でバリデーション成功すること","quantity > 0","quantity=5","quantity=5","中","数量バリデーション"
"190","UT-BLD-190","build.serializers.BuildAllocationItemSerializer","validate_quantity","異常系","quantity <= 0でエラーになること","quantity <= 0","quantity=0","ValidationError(Quantity must be greater than zero)","中","数量バリデーション（ゼロ以下）"
"191","UT-BLD-191","build.serializers.BuildAllocationItemSerializer","validate","異常系","利用可能数量を超過した場合エラーになること","quantity > stock_item.unallocated_quantity()","quantity=100, available=5","ValidationError(quantity: Available quantity (5) exceeded)","高","数量超過バリデーション"
"192","UT-BLD-192","build.serializers.BuildAllocationItemSerializer","validate","異常系","trackableパーツでoutput未設定の場合エラーになること","sub_part.trackable=True, output=None","output=None","ValidationError(output: Build output must be specified for allocation of tracked parts)","高","trackable出力必須"
"193","UT-BLD-193","build.serializers.BuildAllocationItemSerializer","validate","異常系","非trackableパーツでoutput設定の場合エラーになること","sub_part.trackable=False, output設定","output=StockItem","ValidationError(output: Build output cannot be specified for allocation of untracked parts)","中","非trackable出力禁止"
"194","UT-BLD-194","build.serializers.BuildLineSerializer","annotate_queryset","正常系","allocated, on_order等がアノテーションされること","有効なqueryset","queryset, build","allocated, in_production, on_order等がアノテーションされる","中","BuildLineアノテーション"
"195","UT-BLD-195","build.serializers.BuildConsumeSerializer","validate","正常系","items/linesいずれかがあればバリデーション成功すること","items or lines が存在","items=[{...}]","バリデーション成功","中","消費バリデーション"
"196","UT-BLD-196","build.serializers.BuildConsumeSerializer","validate","異常系","items/lines両方空の場合エラーになること","items=[], lines=[]","items=[], lines=[]","ValidationError(At least one item or line must be provided)","中","消費バリデーション（空）"
"197","UT-BLD-197","build.api.BuildFilter","filter_status","正常系","ステータスでフィルタされること","status=10のビルドが存在","status=10","status=10のビルドのみ","中","ステータスフィルタ"
"198","UT-BLD-198","build.api.BuildFilter","filter_active","正常系","active=Trueでアクティブビルドがフィルタされること","アクティブ・非アクティブビルドが存在","active=True","アクティブビルドのみ","中","アクティブフィルタ"
"199","UT-BLD-199","build.api.BuildFilter","filter_overdue","正常系","overdue=Trueで期限超過ビルドがフィルタされること","期限超過・期限内ビルドが存在","overdue=True","期限超過ビルドのみ","中","期限超過フィルタ"
"200","UT-BLD-200","build.api.BuildDetail","destroy","異常系","CANCELLED以外でエラーになること","status=PRODUCTION","DELETE","ValidationError(Build must be cancelled before it can be deleted)","高","削除制限"
