From 4d8314f2952758d89642ecc5afbf8ab4b73397f2 Mon Sep 17 00:00:00 2001 From: Rhushikesh Apte Date: Tue, 12 Oct 2021 22:23:06 +0530 Subject: [PATCH] Add comment to exmplain type and value of subject (#996) --- .../fluent/en_GB/samples/LocalDateExpectationSamples.kt | 8 ++++++++ .../infix/en_GB/samples/LocalDateExpectationSamples.kt | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/LocalDateExpectationSamples.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/LocalDateExpectationSamples.kt index 3570fd5a9f..f314adcd84 100644 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/LocalDateExpectationSamples.kt +++ b/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/samples/LocalDateExpectationSamples.kt @@ -13,10 +13,12 @@ class LocalDateExpectationSamples { fun yearFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .year.toEqual(2021) + // | subject is now of type Int fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .year.notToEqual(2021) + // | subject is now of type Int } } @@ -44,10 +46,12 @@ class LocalDateExpectationSamples { fun monthFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .month.toEqual(Month.OCTOBER.value) + // | subject is now of type Int fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .month.toEqual(Month.SEPTEMBER.value) + // | subject is now of type Int } } @@ -74,10 +78,12 @@ class LocalDateExpectationSamples { fun dayOfWeekFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .dayOfWeek.toEqual(DayOfWeek.SATURDAY) + // | subject is now of type DayOfWeek fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .dayOfWeek.toEqual(DayOfWeek.MONDAY) + // | subject is now of type DayOfWeek } } @@ -104,10 +110,12 @@ class LocalDateExpectationSamples { fun dayFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .day.toEqual(9) + // | subject is now of type Int fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .day.toEqual(5) + // | subject is now of type Int } } diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/LocalDateExpectationSamples.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/LocalDateExpectationSamples.kt index c55cf317ca..e7b88b4026 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/LocalDateExpectationSamples.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/samples/LocalDateExpectationSamples.kt @@ -12,9 +12,11 @@ class LocalDateExpectationSamples { @Test fun yearFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)).year toEqual 2021 + // | subject is now of type Int fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)).year toEqual 2022 + // | subject is now of type Int } } @@ -40,10 +42,12 @@ class LocalDateExpectationSamples { fun monthFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .month toEqual Month.OCTOBER.value + // | subject is now of type Int fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .month toEqual Month.SEPTEMBER.value + // | subject is now of type Int } } @@ -68,10 +72,12 @@ class LocalDateExpectationSamples { fun dayOfWeekFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .dayOfWeek toEqual DayOfWeek.SATURDAY + // | subject is now of type DayOfWeek fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)) .dayOfWeek toEqual DayOfWeek.MONDAY + // | subject is now of type DayOfWeek } } @@ -95,9 +101,11 @@ class LocalDateExpectationSamples { @Test fun dayFeature() { expect(LocalDate.of(2021, Month.OCTOBER, 9)).day toEqual 9 + // | subject is now of type Int fails { expect(LocalDate.of(2021, Month.OCTOBER, 9)).day toEqual 5 + // | subject is now of type Int } }