Skip to content

Commit ddfbdd8

Browse files
committed
docs(misc): 추가 잔존 영역 옛 명명 정리 (영/한)
코드(Src/.cs)는 이미 신규 명명 완료(잔존 0건). 문서에 잔존하던 옛 이름과 사용자 정의 nested class 옛 표준 이름("DomainErrors" → "Domain")을 정리. 대상: - design-philosophy.mdx: 산문 "DomainErrors are auto-generated" → "domain errors are auto-generated" - spec/02-value-object.md (영/한): NestedErrorsClassName 값을 "Domain"으로 정정. "변경 예정" 표현 제거 (이미 적용됨) - guides/testing/16-testing-library.md (영/한): architecture test에서 RequireNestedClassIfExists("DomainErrors", ...) → "Domain" - guides/appendix/A04-architecture-rules-coverage.md (KR): 표 갱신 - tutorials/functional-valueobject/appendix/B-type-selection-guide.md (영/한): 체크리스트 항목 갱신 - tutorials/functional-valueobject/part1/15-validation-fluent (영/한): 출력 prefix 표기 - tutorials/functional-valueobject/part1/16-architecture-test (영/한): 사용자 정의 nested class 패턴 인용 + IValueObject.DomainErrorsNestedClassName → IValueObject.ArchTestContract.NestedErrorsClassName - tutorials/functional-valueobject/part3/08-architecture-test (영/한): 동 - 한글 조사 앞 DomainErrors(가/를/의/로/는/와) 정정 Framework testing helper 메서드 이름(ShouldBeDomainError, ShouldHaveDomainErrors, ShouldHaveOnlyDomainError 등)은 코드 측 메서드 이름이라 그대로 유지. 13/14 학습 흐름 본문 재작성은 별도 트랙(다음 커밋).
1 parent 326b293 commit ddfbdd8

14 files changed

Lines changed: 294 additions & 294 deletions

File tree

Docs.Site/src/content/docs/design-philosophy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public abstract class AbstractValueObject : IValueObject, IEquatable<AbstractVal
3131
Validation rules are defined in a single Value Object location, and `ValidationRules<T>` chaining automatically generates error codes for each condition. The following is a Value Object representing an email address. The `Fin<Email>` returned by `Create` contains an `Email` instance for valid input or an error code for invalid input. No exceptions are thrown, and the possibility of validation logic being scattered is structurally eliminated.
3232

3333
```csharp
34-
// On validation failure, condition-specific DomainErrors are auto-generated:
34+
// On validation failure, condition-specific domain errors are auto-generated:
3535
// "Domain.Email.Null", "Domain.Email.Empty",
3636
// "Domain.Email.TooLong", "Domain.Email.InvalidFormat"
3737
public sealed partial class Email : SimpleValueObject<string>

Docs.Site/src/content/docs/guides/testing/16-testing-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ public void ValueObject_ShouldSatisfy_ImmutabilityRules()
741741
.RequireStatic()
742742
.RequireReturnType(typeof(Validation<,>)));
743743

744-
// DomainErrors nested class validation (only if exists)
745-
@class.RequireNestedClassIfExists("DomainErrors", domainErrors =>
744+
// Domain nested class validation (only if exists)
745+
@class.RequireNestedClassIfExists("Domain", domainErrors =>
746746
{
747747
domainErrors
748748
.RequireInternal()

Docs.Site/src/content/docs/ko/guides/appendix/A04-architecture-rules-coverage.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ API 요약에서 사용 가능한 검증 도구를 확인했습니다. 이제
168168
| `IValueObject` 인터페이스 구현 | 05a | ⚠️ | ArchUnitNET 필터: `.ImplementInterface(typeof(IValueObject))` |
169169
| `IEquatable<>` 구현 | 05a || `RequireImplements(typeof(IEquatable<>))` |
170170
| `SimpleValueObject<T>` 또는 `ValueObject` 상속 | 05a || `RequireInherits(typeof(SimpleValueObject<>))` |
171-
| 중첩 `DomainErrors` 클래스 규칙 | 08b || `RequireNestedClassIfExists("DomainErrors", ...)` |
171+
| 중첩 `Domain` 클래스 규칙 | 08b || `RequireNestedClassIfExists("Domain", ...)` |
172172
| implicit operator 정의 | 05a | 🔧 | `DelegateArchRule`: `op_Implicit` 메서드 존재 확인 |
173173
| `ValidationRules<T>` 사용 | 05a || 소스 코드 분석 필요 (IL에서 호출 패턴 추적 불가) |
174174
| `CreateFromValidation()` 패턴 사용 | 05a || 소스 코드 분석 필요 |
@@ -233,8 +233,8 @@ API 요약에서 사용 가능한 검증 도구를 확인했습니다. 이제
233233

234234
| 규칙 | 출처 | 검증 가능 | 사용 API / 불가 사유 |
235235
|------|------|----------|---------------------|
236-
| 중첩 `DomainErrors` 클래스 (internal sealed) | 08b || `RequireNestedClassIfExists("DomainErrors", n => n.RequireInternal().RequireSealed())` |
237-
| DomainErrors 메서드 (public static, Error 반환) | 08b || `.RequireAllMethods(m => m.RequireStatic().RequireReturnType(typeof(Error)))` |
236+
| 중첩 `Domain` 클래스 (internal sealed) | 08b || `RequireNestedClassIfExists("Domain", n => n.RequireInternal().RequireSealed())` |
237+
| Domain 메서드 (public static, Error 반환) | 08b || `.RequireAllMethods(m => m.RequireStatic().RequireReturnType(typeof(Error)))` |
238238
| `DomainError.For<T>()` 팩토리 패턴 사용 | 08a || 소스 코드 분석 필요 (메서드 본문의 호출 패턴) |
239239
| 에러 코드 형식 (`Domain.Type.Name`) | 08a || 런타임 검증 필요 (단위 테스트로 검증) |
240240
| Custom 에러 타입이 sealed record | 08b | 🔧 | `DelegateArchRule`: 특정 네임스페이스의 Error 파생 타입 검사 |

Docs.Site/src/content/docs/ko/guides/testing/16-testing-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,8 @@ public void ValueObject_ShouldSatisfy_ImmutabilityRules()
741741
.RequireStatic()
742742
.RequireReturnType(typeof(Validation<,>)));
743743

744-
// DomainErrors 중첩 클래스 검증 (존재하는 경우만)
745-
@class.RequireNestedClassIfExists("DomainErrors", domainErrors =>
744+
// Domain 중첩 클래스 검증 (존재하는 경우만)
745+
@class.RequireNestedClassIfExists("Domain", domainErrors =>
746746
{
747747
domainErrors
748748
.RequireInternal()

Docs.Site/src/content/docs/ko/spec/02-value-object.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public interface IValueObject
6565
public const string CreateMethodName = "Create";
6666
public const string CreateFromValidatedMethodName = "CreateFromValidated";
6767
public const string ValidateMethodName = "Validate";
68-
public const string NestedErrorsClassName = "DomainErrors";
68+
public const string NestedErrorsClassName = "Domain";
6969
}
7070
}
7171
```
@@ -79,7 +79,7 @@ public interface IValueObject
7979
| `CreateMethodName` | `"Create"` | 팩토리 메서드 이름 규약 |
8080
| `CreateFromValidatedMethodName` | `"CreateFromValidated"` | 사전 검증된 값의 팩토리 메서드 이름 규약 |
8181
| `ValidateMethodName` | `"Validate"` | 검증 전용 메서드 이름 규약 |
82-
| `NestedErrorsClassName` | `"DomainErrors"` | 중첩 에러 클래스 이름 규약 (1.0.0-alpha.4에서 `"Domain"`으로 변경 예정) |
82+
| `NestedErrorsClassName` | `"Domain"` | 중첩 에러 클래스 이름 규약 |
8383

8484
---
8585

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/appendix/B-type-selection-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public sealed class OrderStatus : SmartEnum<OrderStatus, string>, IValueObject
337337
- [ ] 타입이 sealed로 선언되었는가?
338338
- [ ] public 생성자 대신 팩토리 메서드(Create)를 사용하는가?
339339
- [ ] 검증 로직이 Create 메서드에 있는가?
340-
- [ ] DomainErrors 내부 클래스가 있는가?
340+
- [ ] Domain 내부 클래스가 있는가?
341341
- [ ] 불변성이 보장되는가?
342342
- [ ] 필요한 경우 암시적 변환 연산자가 있는가?
343343
- [ ] ToString()이 적절히 오버라이드되었는가?

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/15-validation-fluent/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static Validation<Error, string> Validate(string value) =>
124124

125125
### 자동 에러 코드 생성
126126

127-
`Validate<T>``DomainErrors.{ValueObjectName}.{ErrorTypeName}` 형식의 에러 코드를 자동으로 생성합니다.
127+
`Validate<T>``Domain.{ValueObjectName}.{ErrorTypeName}` 형식의 에러 코드를 자동으로 생성합니다.
128128

129129
```csharp
130130
// 검증 코드 → 생성되는 에러 코드

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/16-architecture-test/index.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ title: "아키텍처 테스트"
1616

1717
## 왜 필요한가?
1818

19-
C#의 제네릭 제약이나 인터페이스만으로는 모든 값 객체가 동일한 메서드 시그니처를 갖도록 강제할 수 없습니다. 예를 들어, IValueObject 인터페이스에서 Create 메서드를 정의할 수는 있지만 public static이어야 한다는 규칙까지 강제하기는 어렵습니다. 개발자가 실수로 Create 메서드를 private으로 만들거나, sealed를 누락하거나, DomainErrors 클래스 구조를 다르게 작성할 수 있고, 이런 문제는 코드 리뷰로 잡기에는 번거롭고 누락되기 쉽습니다.
19+
C#의 제네릭 제약이나 인터페이스만으로는 모든 값 객체가 동일한 메서드 시그니처를 갖도록 강제할 수 없습니다. 예를 들어, IValueObject 인터페이스에서 Create 메서드를 정의할 수는 있지만 public static이어야 한다는 규칙까지 강제하기는 어렵습니다. 개발자가 실수로 Create 메서드를 private으로 만들거나, sealed를 누락하거나, Domain 클래스 구조를 다르게 작성할 수 있고, 이런 문제는 코드 리뷰로 잡기에는 번거롭고 누락되기 쉽습니다.
2020

2121
아키텍처 테스트를 도입하면 컴파일 타임에 강제할 수 없는 설계 규칙을 CI 파이프라인에서 자동으로 검증할 수 있습니다.
2222

@@ -60,12 +60,12 @@ IValueObject 인터페이스를 구현하는 모든 클래스가 특정한 구
6060

6161
### 도메인 에러 규칙 검증
6262

63-
DomainErrors 중첩 클래스가 있는 값 객체에 대해, 해당 클래스가 올바른 구조를 갖추고 있는지 검증합니다. 모든 값 객체에 DomainErrors가 필수는 아니므로 `RequireNestedClassIfExists`로 선택적으로 검증합니다.
63+
Domain 중첩 클래스가 있는 값 객체에 대해, 해당 클래스가 올바른 구조를 갖추고 있는지 검증합니다. 모든 값 객체에 Domain이 필수는 아니므로 `RequireNestedClassIfExists`로 선택적으로 검증합니다.
6464

6565
```csharp
66-
// DomainErrors 중첩 클래스 규칙 검증
66+
// Domain 중첩 클래스 규칙 검증
6767
@class
68-
.RequireNestedClassIfExists("DomainErrors", domainErrors =>
68+
.RequireNestedClassIfExists("Domain", domainErrors =>
6969
{
7070
domainErrors
7171
.RequireInternal() // internal 클래스
@@ -152,9 +152,9 @@ public void ValueObject_ShouldSatisfy_Rules()
152152
.RequireReturnType(typeof(Validation<,>)))
153153
.RequireImplements(typeof(IEquatable<>));
154154

155-
// DomainErrors 중첩 클래스 규칙
155+
// Domain 중첩 클래스 규칙
156156
@class
157-
.RequireNestedClassIfExists(IValueObject.DomainErrorsNestedClassName, domainErrors =>
157+
.RequireNestedClassIfExists(IValueObject.ArchTestContract.NestedErrorsClassName, domainErrors =>
158158
{
159159
domainErrors
160160
.RequireInternal()
@@ -216,15 +216,15 @@ public void ValueObject_ShouldSatisfy_Rules()
216216
}
217217
```
218218

219-
### Q2: DomainErrors 중첩 클래스가 선택적(IfExists)으로 검증되는 이유는?
219+
### Q2: Domain 중첩 클래스가 선택적(IfExists)으로 검증되는 이유는?
220220

221-
모든 값 객체가 DomainErrors를 가져야 하는 것은 아닙니다. 단순한 값 객체는 복잡한 검증 로직이 없어 DomainErrors가 불필요할 수 있습니다. `RequireNestedClassIfExists`DomainErrors가 있는 값 객체에만 올바른 구조를 강제하고, 없는 값 객체는 검증을 건너뜁니다.
221+
모든 값 객체가 Domain을 가져야 하는 것은 아닙니다. 단순한 값 객체는 복잡한 검증 로직이 없어 Domain이 불필요할 수 있습니다. `RequireNestedClassIfExists`Domain이 있는 값 객체에만 올바른 구조를 강제하고, 없는 값 객체는 검증을 건너뜁니다.
222222

223223
```csharp
224224
// 복잡한 검증이 필요한 값 객체
225225
public sealed class Price : ComparableSimpleValueObject<decimal>
226226
{
227-
internal static class DomainErrors // DomainErrors 존재
227+
internal static class Domain // Domain 존재
228228
{
229229
public static Error Negative(decimal value) => ...;
230230
}
@@ -233,13 +233,13 @@ public sealed class Price : ComparableSimpleValueObject<decimal>
233233
// 단순한 값 객체
234234
public sealed class Currency : SmartEnum<Currency, string>
235235
{
236-
// DomainErrors 없음 - 검증 건너뜀
236+
// Domain 없음 - 검증 건너뜀
237237
}
238238

239239
// 아키텍처 테스트: 선택적 검증
240-
@class.RequireNestedClassIfExists("DomainErrors", domainErrors =>
240+
@class.RequireNestedClassIfExists("Domain", domainErrors =>
241241
{
242-
// DomainErrors가 있으면 이 규칙들을 적용
242+
// Domain이 있으면 이 규칙들을 적용
243243
domainErrors.RequireInternal().RequireSealed();
244244
});
245245
```

0 commit comments

Comments
 (0)