Skip to content

refactor(BarcodeInput): remove business logic from behavior #104

refactor(BarcodeInput): remove business logic from behavior

refactor(BarcodeInput): remove business logic from behavior #104

GitHub Actions / Unit Tests Results failed Nov 15, 2024 in 1s

Unit Tests Results ❌

Tests failed

❌ Smartway.UiComponent.UnitTests/TestResults/test-results-unittests.trx

28 tests were completed in 1s with 27 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Smartway.UiComponent.UnitTests.Inputs.Barcode.OnTextChanged 1✔️ 1❌ 97ms
Smartway.UiComponent.UnitTests.Inputs.NumericDateEntryTest.NumericDateEntryTest 26✔️ 119ms

❌ Smartway.UiComponent.UnitTests.Inputs.Barcode.OnTextChanged

✔️ GencodeFilledWithNotDigitChar
❌ ValidGencodeFilled
	Moq.MockException : 
	Expected invocation on the mock once, but was 0 times: _ => _.Execute("2970812075764")
	
	Performed invocations:
	
	   Mock<ICommand:1> (_):
	   No invocations performed.
	

✔️ Smartway.UiComponent.UnitTests.Inputs.NumericDateEntryTest.NumericDateEntryTest

✔️ CustomCultureFilledDate(deviceCulture: "fr-FR", customCulture: "fr-FR", year: 2024, expectedYear: 2024)
✔️ CustomCultureFilledDate(deviceCulture: "fr-FR", customCulture: "th-TH", year: 2024, expectedYear: 2024)
✔️ CustomCultureFilledDate(deviceCulture: "th-TH", customCulture: "fr-FR", year: 2024, expectedYear: 2024)
✔️ CustomCultureFilledDate(deviceCulture: "th-TH", customCulture: "th-TH", year: 2024, expectedYear: 2024)
✔️ CustomCulturePlaceholder(deviceCulture: "fr-FR", customCulture: "fr-FR", year: 2024, expectedYear: "24")
✔️ CustomCulturePlaceholder(deviceCulture: "fr-FR", customCulture: "th-TH", year: 2024, expectedYear: "67")
✔️ CustomCulturePlaceholder(deviceCulture: "th-TH", customCulture: "fr-FR", year: 2024, expectedYear: "81")
✔️ CustomCulturePlaceholder(deviceCulture: "th-TH", customCulture: "th-TH", year: 2024, expectedYear: "24")
✔️ DefaultPlaceholder(culture: "en-EN", day: "DD", month: "MM", year: "YY")
✔️ DefaultPlaceholder(culture: "en-US", day: "DD", month: "MM", year: "YY")
✔️ DefaultPlaceholder(culture: "es-ES", day: "JJ", month: "MM", year: "AA")
✔️ DefaultPlaceholder(culture: "fr-FR", day: "JJ", month: "MM", year: "AA")
✔️ DefaultPlaceholder(culture: "it-IT", day: "JJ", month: "MM", year: "AA")
✔️ DefaultPlaceholder(culture: "ro-RO", day: "JJ", month: "MM", year: "AA")
✔️ DefaultPlaceholder(culture: "ru-RU", day: "JJ", month: "MM", year: "AA")
✔️ FilledCorrect
✔️ FilledUncorrectDate(day: "10", month: "02", year: "-1")
✔️ FilledUncorrectDate(day: "10", month: "90", year: "22")
✔️ FilledUncorrectDate(day: "31", month: "02", year: "22")
✔️ MonthDayOrderCulture(culture: "en-EN", expectedFirst: "10", expectedSecond: "06")
✔️ MonthDayOrderCulture(culture: "en-US", expectedFirst: "10", expectedSecond: "06")
✔️ MonthDayOrderCulture(culture: "es-ES", expectedFirst: "06", expectedSecond: "10")
✔️ MonthDayOrderCulture(culture: "fr-FR", expectedFirst: "06", expectedSecond: "10")
✔️ MonthDayOrderCulture(culture: "it-IT", expectedFirst: "06", expectedSecond: "10")
✔️ MonthDayOrderCulture(culture: "ro-RO", expectedFirst: "06", expectedSecond: "10")
✔️ MonthDayOrderCulture(culture: "ru-RU", expectedFirst: "06", expectedSecond: "10")

Annotations

Check failure on line 37 in Smartway.UiComponent.UnitTests/Inputs/Barcode/BarcodeInputBehaviorTest.cs

See this annotation in the file changed.

@github-actions github-actions / Unit Tests Results

Smartway.UiComponent.UnitTests.Inputs.Barcode.OnTextChanged ► ValidGencodeFilled

Failed test found in:
  Smartway.UiComponent.UnitTests/TestResults/test-results-unittests.trx
Error:
  Moq.MockException : 
  Expected invocation on the mock once, but was 0 times: _ => _.Execute("2970812075764")
  
  Performed invocations:
  
     Mock<ICommand:1> (_):
     No invocations performed.
  
Raw output
Moq.MockException : 
Expected invocation on the mock once, but was 0 times: _ => _.Execute("2970812075764")

Performed invocations:

   Mock<ICommand:1> (_):
   No invocations performed.

   at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage) in C:\projects\moq4\src\Moq\Mock.cs:line 337
   at Moq.Mock`1.Verify(Expression`1 expression, Times times) in C:\projects\moq4\src\Moq\Mock`1.cs:line 738
   at Moq.Mock`1.Verify(Expression`1 expression, Func`1 times) in C:\projects\moq4\src\Moq\Mock`1.cs:line 752
   at Smartway.UiComponent.UnitTests.Inputs.Barcode.OnTextChanged.ValidGencodeFilled() in /runner_work/Smartway.UiComponent/Smartway.UiComponent/Smartway.UiComponent.UnitTests/Inputs/Barcode/BarcodeInputBehaviorTest.cs:line 37