Skip to content

Commit 3eacef0

Browse files
committed
docs(tutorial): 13/14 사용자 정의 nested class 이름을 신규 표준 "Domain"으로 통일 (영/한)
framework가 architecture test로 검증하는 사용자 정의 nested class 표준 이름이 v1.0.0-alpha.4에서 "DomainErrors" → "Domain"으로 변경됨 (IValueObject.ArchTestContract.NestedErrorsClassName = "Domain"). 13/14 튜토리얼의 학습 흐름은 보존하되(13: 사용자 정의 nested class 도입 → 14: framework helper로 단순화) 모든 클래스/변수 이름을 신규 표준에 맞춤. 대상 (13/14 영/한, .md + self-contained framework .cs): - internal static class DomainErrors → internal static class Domain - DomainErrors.X(args) 호출 → Domain.X(args) - nameof(DomainErrors) → nameof(Domain) - 변수 이름 DomainErrorsNestedClassName → NestedErrorsClassName (실제 framework IValueObject.ArchTestContract와 동일) - 변수 이름 DomainErrorsPrefix → DomainPrefix - 산문 "DomainErrors 클래스" → "Domain 클래스" - 한글 조사 앞 DomainErrors가/를/의/로/는/와 정정 Framework testing helper 메서드 이름(ShouldHaveDomainErrors, ShouldBeDomainError 등)은 Functorium.Testing 라이브러리의 실제 메서드 이름이라 그대로 유지. 검증: FunctionalValueObject.slnx 빌드 0 오류, 1080/1080 테스트 통과. 잔존 grep 0건 (testing helper 메서드 이름 외).
1 parent ddfbdd8 commit 3eacef0

22 files changed

Lines changed: 175 additions & 175 deletions

File tree

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode.Tests.Unit/DenominatorTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void Create_ShouldReturnFailureResult_WhenValueIsZero()
1919
{
2020
// Arrange
2121
int value = 0;
22-
string expectedErrorCode = $"{nameof(Denominator.DomainErrors)}.{nameof(Denominator)}.{nameof(Denominator.DomainErrors.Zero)}";
22+
string expectedErrorCode = $"{nameof(Denominator.Domain)}.{nameof(Denominator)}.{nameof(Denominator.Domain.Zero)}";
2323

2424
// Act
2525
var actual = Denominator.Create(value);

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode.Tests.Unit/ErrorFactoryTests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public class ErrorFactoryTests
1414
public void Create_ShouldReturnExpectedError_WhenUsingStringParameters()
1515
{
1616
// Arrange
17-
string errorCode = "DomainErrors.Name.TooShort";
17+
string errorCode = "Domain.Name.TooShort";
1818
string errorCurrentValue = "a";
1919

20-
string expectedErrorCode = "DomainErrors.Name.TooShort";
20+
string expectedErrorCode = "Domain.Name.TooShort";
2121
string expectedCurrentValue = "a";
2222

2323
string errorMessage = "Name is too short. Current value: 'a'";
@@ -38,10 +38,10 @@ public void Create_ShouldReturnExpectedError_WhenUsingStringParameters()
3838
public void Create_ShouldReturnExpectedErrorInt_WhenUsingStringAndIntParameters()
3939
{
4040
// Arrange
41-
string errorCode = "DomainErrors.Age.OutOfRange";
41+
string errorCode = "Domain.Age.OutOfRange";
4242
int errorCurrentValue = 150;
4343

44-
string expectedErrorCode = "DomainErrors.Age.OutOfRange";
44+
string expectedErrorCode = "Domain.Age.OutOfRange";
4545
int expectedCurrentValue = 150;
4646
string errorMessage = "Age is out of range. Current value: '150'";
4747

@@ -58,9 +58,9 @@ public void Create_ShouldReturnExpectedErrorInt_WhenUsingStringAndIntParameters(
5858

5959
// 테스트 시나리오: 제네릭 타입을 사용하여 타입 안전한 에러를 생성해야 한다
6060
[Theory]
61-
[InlineData("DomainErrors.Email.MissingAt", "not-an-email", "Email is missing '@' symbol. Current value: 'not-an-email'")]
62-
[InlineData("DomainErrors.Phone.NotNumeric", "invalid-phone", "Phone number is not numeric. Current value: 'invalid-phone'")]
63-
[InlineData("DomainErrors.Address.Empty", "empty-address", "Address is empty. Current value: 'empty-address'")]
61+
[InlineData("Domain.Email.MissingAt", "not-an-email", "Email is missing '@' symbol. Current value: 'not-an-email'")]
62+
[InlineData("Domain.Phone.NotNumeric", "invalid-phone", "Phone number is not numeric. Current value: 'invalid-phone'")]
63+
[InlineData("Domain.Address.Empty", "empty-address", "Address is empty. Current value: 'empty-address'")]
6464
public void Create_ShouldReturnExpectedErrorWithGenericType_WhenUsingGenericMethod(string errorCode, string errorCurrentValue, string errorMessage)
6565
{
6666
// Arrange
@@ -83,12 +83,12 @@ public void Create_ShouldReturnExpectedErrorWithGenericType_WhenUsingGenericMeth
8383
public void Create_ShouldReturnExpectedErrorWithTwoGenericTypes_WhenUsingTwoValueMethod()
8484
{
8585
// Arrange
86-
string errorCode = "DomainErrors.Coordinate.XOutOfRange";
86+
string errorCode = "Domain.Coordinate.XOutOfRange";
8787
int errorCurrentValue1 = 1500;
8888
int errorCurrentValue2 = 2000;
8989
string errorMessage = "Coordinate X is out of range. Current values: '1500', '2000'";
9090

91-
string expectedErrorCode = "DomainErrors.Coordinate.XOutOfRange";
91+
string expectedErrorCode = "Domain.Coordinate.XOutOfRange";
9292
int expectedCurrentValue1 = 1500;
9393
int expectedCurrentValue2 = 2000;
9494

@@ -109,13 +109,13 @@ public void Create_ShouldReturnExpectedErrorWithTwoGenericTypes_WhenUsingTwoValu
109109
public void Create_ShouldReturnExpectedErrorWithThreeGenericTypes_WhenUsingThreeValueMethod()
110110
{
111111
// Arrange
112-
string errorCode = "DomainErrors.Address.Empty";
112+
string errorCode = "Domain.Address.Empty";
113113
string errorCurrentValue1 = "Empty Street";
114114
string errorCurrentValue2 = "Invalid City";
115115
string errorCurrentValue3 = "12345";
116116
string errorMessage = "Address is empty. Street: 'Empty Street', City: 'Invalid City', PostalCode: '12345'";
117117

118-
string expectedErrorCode = "DomainErrors.Address.Empty";
118+
string expectedErrorCode = "Domain.Address.Empty";
119119
string expectedCurrentValue1 = "Empty Street";
120120
string expectedCurrentValue2 = "Invalid City";
121121
string expectedCurrentValue3 = "12345";
@@ -138,10 +138,10 @@ public void Create_ShouldReturnExpectedErrorWithThreeGenericTypes_WhenUsingThree
138138
public void CreateFromException_ShouldReturnExceptionalError_WhenUsingException()
139139
{
140140
// Arrange
141-
string errorCode = "DomainErrors.System.Exception";
141+
string errorCode = "Domain.System.Exception";
142142
var exception = new InvalidOperationException("Test exception message");
143143

144-
string expectedErrorCode = "DomainErrors.System.Exception";
144+
string expectedErrorCode = "Domain.System.Exception";
145145
string expectedMessage = "Test exception message";
146146

147147
// Act
@@ -156,9 +156,9 @@ public void CreateFromException_ShouldReturnExceptionalError_WhenUsingException(
156156

157157
// 테스트 시나리오: 여러 문자열을 점으로 연결하여 에러 코드를 포맷해야 한다
158158
[Theory]
159-
[InlineData(new string[] { "DomainErrors", "User", "AgeOutOfRange" }, "DomainErrors.User.AgeOutOfRange")]
160-
[InlineData(new string[] { "DomainErrors", "Payment", "Declined" }, "DomainErrors.Payment.Declined")]
161-
[InlineData(new string[] { "DomainErrors", "Order", "NotFound" }, "DomainErrors.Order.NotFound")]
159+
[InlineData(new string[] { "Domain", "User", "AgeOutOfRange" }, "Domain.User.AgeOutOfRange")]
160+
[InlineData(new string[] { "Domain", "Payment", "Declined" }, "Domain.Payment.Declined")]
161+
[InlineData(new string[] { "Domain", "Order", "NotFound" }, "Domain.Order.NotFound")]
162162
public void Format_ShouldReturnFormattedErrorCode_WhenUsingStringArray(string[] parts, string expected)
163163
{
164164
// Arrange

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/01-ComparableNot/01-PrimitiveValueObjects/BinaryData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public static BinaryData CreateFromValidated(byte[] validatedValue) =>
5050
/// <returns>검증 결과</returns>
5151
public static Validation<Error, byte[]> Validate(byte[]? value) =>
5252
value == null || value.Length == 0
53-
? DomainErrors.Empty(value)
53+
? Domain.Empty(value)
5454
: value;
5555

56-
internal static class DomainErrors
56+
internal static class Domain
5757
{
5858
/// <summary>
5959
/// 빈 바이너리 데이터에 대한 에러
@@ -62,7 +62,7 @@ internal static class DomainErrors
6262
/// <returns>구조화된 에러 정보</returns>
6363
public static Error Empty(byte[]? value) =>
6464
ErrorFactory.Create(
65-
errorCode: $"{nameof(DomainErrors)}.{nameof(BinaryData)}.{nameof(Empty)}",
65+
errorCode: $"{nameof(Domain)}.{nameof(BinaryData)}.{nameof(Empty)}",
6666
errorCurrentValue: value?.Length.ToString() ?? "null",
6767
errorMessage: $"Binary data cannot be empty or null. Current value: '{value?.Length.ToString() ?? "null"}'");
6868
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/01-ComparableNot/02-CompositePrimitiveValueObjects/Coordinate.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ from validY in ValidateY(y)
6767
/// <returns>검증 결과</returns>
6868
private static Validation<Error, int> ValidateX(int x) =>
6969
x < 0 || x > 1000
70-
? DomainErrors.XOutOfRange(x)
70+
? Domain.XOutOfRange(x)
7171
: x;
7272

7373
/// <summary>
@@ -77,10 +77,10 @@ private static Validation<Error, int> ValidateX(int x) =>
7777
/// <returns>검증 결과</returns>
7878
private static Validation<Error, int> ValidateY(int y) =>
7979
y < 0 || y > 1000
80-
? DomainErrors.YOutOfRange(y)
80+
? Domain.YOutOfRange(y)
8181
: y;
8282

83-
internal static class DomainErrors
83+
internal static class Domain
8484
{
8585
/// <summary>
8686
/// 범위를 벗어난 X 좌표에 대한 에러
@@ -89,7 +89,7 @@ internal static class DomainErrors
8989
/// <returns>구조화된 에러 정보</returns>
9090
public static Error XOutOfRange(int value) =>
9191
ErrorFactory.Create(
92-
errorCode: $"{nameof(DomainErrors)}.{nameof(Coordinate)}.{nameof(XOutOfRange)}",
92+
errorCode: $"{nameof(Domain)}.{nameof(Coordinate)}.{nameof(XOutOfRange)}",
9393
errorCurrentValue: value,
9494
errorMessage: $"X coordinate must be between 0 and 1000. Current value: '{value}'");
9595

@@ -100,7 +100,7 @@ public static Error XOutOfRange(int value) =>
100100
/// <returns>구조화된 에러 정보</returns>
101101
public static Error YOutOfRange(int value) =>
102102
ErrorFactory.Create(
103-
errorCode: $"{nameof(DomainErrors)}.{nameof(Coordinate)}.{nameof(YOutOfRange)}",
103+
errorCode: $"{nameof(Domain)}.{nameof(Coordinate)}.{nameof(YOutOfRange)}",
104104
errorCurrentValue: value,
105105
errorMessage: $"Y coordinate must be between 0 and 1000. Current value: '{value}'");
106106
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/01-ComparableNot/03-CompositeValueObjects/City.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public static City CreateFromValidated(string validatedValue) =>
5050
/// <returns>검증 결과</returns>
5151
public static Validation<Error, string> Validate(string value) =>
5252
string.IsNullOrWhiteSpace(value)
53-
? DomainErrors.Empty(value)
53+
? Domain.Empty(value)
5454
: value;
5555

56-
internal static class DomainErrors
56+
internal static class Domain
5757
{
5858
/// <summary>
5959
/// 빈 도시명에 대한 에러
@@ -62,7 +62,7 @@ internal static class DomainErrors
6262
/// <returns>구조화된 에러 정보</returns>
6363
public static Error Empty(string value) =>
6464
ErrorFactory.Create(
65-
errorCode: $"{nameof(DomainErrors)}.{nameof(City)}.{nameof(Empty)}",
65+
errorCode: $"{nameof(Domain)}.{nameof(City)}.{nameof(Empty)}",
6666
errorCurrentValue: value,
6767
errorMessage: $"City name cannot be empty. Current value: '{value}'");
6868
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/01-ComparableNot/03-CompositeValueObjects/PostalCode.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static Validation<Error, string> Validate(string value) =>
5959
/// <returns>검증 결과</returns>
6060
private static Validation<Error, string> ValidateNotEmpty(string value) =>
6161
string.IsNullOrWhiteSpace(value)
62-
? DomainErrors.Empty(value)
62+
? Domain.Empty(value)
6363
: value;
6464

6565
/// <summary>
@@ -69,10 +69,10 @@ private static Validation<Error, string> ValidateNotEmpty(string value) =>
6969
/// <returns>검증 결과</returns>
7070
private static Validation<Error, string> ValidateFormat(string value) =>
7171
value.Length != 5 || !value.All(char.IsDigit)
72-
? DomainErrors.NotFiveDigits(value)
72+
? Domain.NotFiveDigits(value)
7373
: value;
7474

75-
internal static class DomainErrors
75+
internal static class Domain
7676
{
7777
/// <summary>
7878
/// 빈 우편번호에 대한 에러
@@ -81,7 +81,7 @@ internal static class DomainErrors
8181
/// <returns>구조화된 에러 정보</returns>
8282
public static Error Empty(string value) =>
8383
ErrorFactory.Create(
84-
errorCode: $"{nameof(DomainErrors)}.{nameof(PostalCode)}.{nameof(Empty)}",
84+
errorCode: $"{nameof(Domain)}.{nameof(PostalCode)}.{nameof(Empty)}",
8585
errorCurrentValue: value,
8686
errorMessage: $"Postal code cannot be empty. Current value: '{value}'");
8787

@@ -92,7 +92,7 @@ public static Error Empty(string value) =>
9292
/// <returns>구조화된 에러 정보</returns>
9393
public static Error NotFiveDigits(string value) =>
9494
ErrorFactory.Create(
95-
errorCode: $"{nameof(DomainErrors)}.{nameof(PostalCode)}.{nameof(NotFiveDigits)}",
95+
errorCode: $"{nameof(Domain)}.{nameof(PostalCode)}.{nameof(NotFiveDigits)}",
9696
errorCurrentValue: value,
9797
errorMessage: $"Postal code must be exactly 5 digits. Current value: '{value}'");
9898
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/01-ComparableNot/03-CompositeValueObjects/Street.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public static Street CreateFromValidated(string validatedValue) =>
5050
/// <returns>검증 결과</returns>
5151
public static Validation<Error, string> Validate(string value) =>
5252
string.IsNullOrWhiteSpace(value)
53-
? DomainErrors.Empty(value)
53+
? Domain.Empty(value)
5454
: value;
5555

56-
internal static class DomainErrors
56+
internal static class Domain
5757
{
5858
/// <summary>
5959
/// 빈 거리명에 대한 에러
@@ -62,7 +62,7 @@ internal static class DomainErrors
6262
/// <returns>구조화된 에러 정보</returns>
6363
public static Error Empty(string value) =>
6464
ErrorFactory.Create(
65-
errorCode: $"{nameof(DomainErrors)}.{nameof(Street)}.{nameof(Empty)}",
65+
errorCode: $"{nameof(Domain)}.{nameof(Street)}.{nameof(Empty)}",
6666
errorCurrentValue: value,
6767
errorMessage: $"Street name cannot be empty. Current value: '{value}'");
6868
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/02-Comparable/01-PrimitiveValueObjects/Denominator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ public static Denominator CreateFromValidated(int validatedValue) =>
5050
/// <returns>검증 결과</returns>
5151
public static Validation<Error, int> Validate(int value) =>
5252
value == 0
53-
? DomainErrors.Zero(value)
53+
? Domain.Zero(value)
5454
: value;
5555

56-
internal static class DomainErrors
56+
internal static class Domain
5757
{
5858
/// <summary>
5959
/// 0 값에 대한 에러
@@ -62,7 +62,7 @@ internal static class DomainErrors
6262
/// <returns>구조화된 에러 정보</returns>
6363
public static Error Zero(int value) =>
6464
ErrorFactory.Create(
65-
errorCode: $"{nameof(DomainErrors)}.{nameof(Denominator)}.{nameof(Zero)}",
65+
errorCode: $"{nameof(Domain)}.{nameof(Denominator)}.{nameof(Zero)}",
6666
errorCurrentValue: value.ToString(),
6767
errorMessage: $"Denominator cannot be zero. Current value: '{value}'");
6868
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/02-Comparable/02-CompositePrimitiveValueObjects/DateRange.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ from validRange in ValidateDateRange(validStartDate, validEndDate)
6969
/// <returns>검증 결과</returns>
7070
private static Validation<Error, DateTime> ValidateStartDate(DateTime startDate) =>
7171
startDate < DateTime.MinValue || startDate > DateTime.MaxValue
72-
? DomainErrors.InvalidStartDate(startDate)
72+
? Domain.InvalidStartDate(startDate)
7373
: startDate;
7474

7575
/// <summary>
@@ -79,7 +79,7 @@ private static Validation<Error, DateTime> ValidateStartDate(DateTime startDate)
7979
/// <returns>검증 결과</returns>
8080
private static Validation<Error, DateTime> ValidateEndDate(DateTime endDate) =>
8181
endDate < DateTime.MinValue || endDate > DateTime.MaxValue
82-
? DomainErrors.InvalidEndDate(endDate)
82+
? Domain.InvalidEndDate(endDate)
8383
: endDate;
8484

8585
/// <summary>
@@ -90,10 +90,10 @@ private static Validation<Error, DateTime> ValidateEndDate(DateTime endDate) =>
9090
/// <returns>검증 결과</returns>
9191
private static Validation<Error, (DateTime StartDate, DateTime EndDate)> ValidateDateRange(DateTime startDate, DateTime endDate) =>
9292
startDate >= endDate
93-
? DomainErrors.StartAfterEnd(startDate, endDate)
93+
? Domain.StartAfterEnd(startDate, endDate)
9494
: (StartDate: startDate, EndDate: endDate);
9595

96-
internal static class DomainErrors
96+
internal static class Domain
9797
{
9898
/// <summary>
9999
/// 유효하지 않은 시작일에 대한 에러
@@ -102,7 +102,7 @@ internal static class DomainErrors
102102
/// <returns>구조화된 에러 정보</returns>
103103
public static Error InvalidStartDate(DateTime value) =>
104104
ErrorFactory.Create(
105-
errorCode: $"{nameof(DomainErrors)}.{nameof(DateRange)}.{nameof(InvalidStartDate)}",
105+
errorCode: $"{nameof(Domain)}.{nameof(DateRange)}.{nameof(InvalidStartDate)}",
106106
errorCurrentValue: value,
107107
errorMessage: $"Start date is invalid. Current value: '{value}'");
108108

@@ -113,7 +113,7 @@ public static Error InvalidStartDate(DateTime value) =>
113113
/// <returns>구조화된 에러 정보</returns>
114114
public static Error InvalidEndDate(DateTime value) =>
115115
ErrorFactory.Create(
116-
errorCode: $"{nameof(DomainErrors)}.{nameof(DateRange)}.{nameof(InvalidEndDate)}",
116+
errorCode: $"{nameof(Domain)}.{nameof(DateRange)}.{nameof(InvalidEndDate)}",
117117
errorCurrentValue: value,
118118
errorMessage: $"End date is invalid. Current value: '{value}'");
119119

@@ -125,7 +125,7 @@ public static Error InvalidEndDate(DateTime value) =>
125125
/// <returns>구조화된 에러 정보</returns>
126126
public static Error StartAfterEnd(DateTime startDate, DateTime endDate) =>
127127
ErrorFactory.Create(
128-
errorCode: $"{nameof(DomainErrors)}.{nameof(DateRange)}.{nameof(StartAfterEnd)}",
128+
errorCode: $"{nameof(Domain)}.{nameof(DateRange)}.{nameof(StartAfterEnd)}",
129129
errorCurrentValue: $"StartDate: {startDate}, EndDate: {endDate}",
130130
errorMessage: $"Start date cannot be after or equal to end date. Start: '{startDate}', End: '{endDate}'");
131131
}

Docs.Site/src/content/docs/ko/tutorials/functional-valueobject/part1-valueobject-concepts/13-error-code/ErrorCode/ValueObjects/02-Comparable/03-CompositeValueObjects/Currency.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public static Validation<Error, string> Validate(string currencyCode) =>
125125
/// <returns>검증 결과</returns>
126126
private static Validation<Error, string> ValidateNotEmpty(string currencyCode) =>
127127
string.IsNullOrWhiteSpace(currencyCode)
128-
? DomainErrors.Empty(currencyCode)
128+
? Domain.Empty(currencyCode)
129129
: currencyCode;
130130

131131
/// <summary>
@@ -135,7 +135,7 @@ private static Validation<Error, string> ValidateNotEmpty(string currencyCode) =
135135
/// <returns>검증 결과</returns>
136136
private static Validation<Error, string> ValidateFormat(string currencyCode) =>
137137
currencyCode.Length != 3 || !currencyCode.All(char.IsLetter)
138-
? DomainErrors.NotThreeLetters(currencyCode)
138+
? Domain.NotThreeLetters(currencyCode)
139139
: currencyCode.ToUpperInvariant();
140140

141141
/// <summary>
@@ -152,7 +152,7 @@ private static Validation<Error, string> ValidateSupported(string currencyCode)
152152
}
153153
catch (SmartEnumNotFoundException)
154154
{
155-
return DomainErrors.Unsupported(currencyCode);
155+
return Domain.Unsupported(currencyCode);
156156
}
157157
}
158158

@@ -193,10 +193,10 @@ public string FormatAmountWithoutDecimals(decimal amount) =>
193193
$"{Symbol}{amount:N0}";
194194

195195
/// <summary>
196-
/// DomainErrors 중첩 클래스
196+
/// Domain 중첩 클래스
197197
/// ValueObject 규칙에 따른 구조화된 에러 처리
198198
/// </summary>
199-
internal static class DomainErrors
199+
internal static class Domain
200200
{
201201
/// <summary>
202202
/// 빈 통화 코드 에러
@@ -205,7 +205,7 @@ internal static class DomainErrors
205205
/// <returns>에러</returns>
206206
public static Error Empty(string value) =>
207207
ErrorFactory.Create(
208-
errorCode: $"{nameof(DomainErrors)}.{nameof(Currency)}.{nameof(Empty)}",
208+
errorCode: $"{nameof(Domain)}.{nameof(Currency)}.{nameof(Empty)}",
209209
errorCurrentValue: value,
210210
errorMessage: $"Currency code cannot be empty. Current value: '{value}'");
211211

@@ -216,7 +216,7 @@ public static Error Empty(string value) =>
216216
/// <returns>에러</returns>
217217
public static Error NotThreeLetters(string value) =>
218218
ErrorFactory.Create(
219-
errorCode: $"{nameof(DomainErrors)}.{nameof(Currency)}.{nameof(NotThreeLetters)}",
219+
errorCode: $"{nameof(Domain)}.{nameof(Currency)}.{nameof(NotThreeLetters)}",
220220
errorCurrentValue: value,
221221
errorMessage: $"Currency code must be exactly 3 letters. Current value: '{value}'");
222222

@@ -227,7 +227,7 @@ public static Error NotThreeLetters(string value) =>
227227
/// <returns>에러</returns>
228228
public static Error Unsupported(string value) =>
229229
ErrorFactory.Create(
230-
errorCode: $"{nameof(DomainErrors)}.{nameof(Currency)}.{nameof(Unsupported)}",
230+
errorCode: $"{nameof(Domain)}.{nameof(Currency)}.{nameof(Unsupported)}",
231231
errorCurrentValue: value,
232232
errorMessage: $"Currency code is not supported. Current value: '{value}'");
233233
}

0 commit comments

Comments
 (0)