-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...st/java/org/saynotobugs/confidence/description/bifunction/TextAndOriginalAndTextTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.saynotobugs.confidence.description.bifunction; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.saynotobugs.confidence.description.Text; | ||
import org.saynotobugs.confidence.quality.composite.AllOf; | ||
import org.saynotobugs.confidence.quality.composite.Has; | ||
import org.saynotobugs.confidence.test.quality.DescribesAs; | ||
|
||
import static org.saynotobugs.confidence.Assertion.assertThat; | ||
|
||
class TextAndOriginalAndTextTest | ||
{ | ||
@Test | ||
void testStringCtor() | ||
{ | ||
assertThat(new TextAndOriginalAndText<Integer>("text1", "text2"), | ||
new AllOf<>( | ||
new Has<>(f -> f.value(new Text("abc")), new DescribesAs("text1 abc text2")), | ||
new Has<>(f -> f.value(678, new Text("abc")), new DescribesAs("text1 abc text2")))); | ||
} | ||
|
||
@Test | ||
void testDescriptionCtor() | ||
{ | ||
assertThat(new TextAndOriginalAndText<Integer>(new Text("text1"), new Text("text2")), | ||
new AllOf<>( | ||
new Has<>(f -> f.value(new Text("abc")), new DescribesAs("text1 abc text2")), | ||
new Has<>(f -> f.value(678, new Text("abc")), new DescribesAs("text1 abc text2")))); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
.../test/java/org/saynotobugs/confidence/description/bifunction/TextAndValueAndTextTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.saynotobugs.confidence.description.bifunction; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.saynotobugs.confidence.description.Text; | ||
import org.saynotobugs.confidence.quality.composite.AllOf; | ||
import org.saynotobugs.confidence.quality.composite.Has; | ||
import org.saynotobugs.confidence.test.quality.DescribesAs; | ||
|
||
import static org.saynotobugs.confidence.Assertion.assertThat; | ||
|
||
class TextAndValueAndTextTest | ||
{ | ||
@Test | ||
void testStringCtor() | ||
{ | ||
assertThat(new TextAndValueAndText<Integer>("text1", "text2"), | ||
new AllOf<>( | ||
new Has<>(f -> f.value(678), new DescribesAs("text1 678 text2")), | ||
new Has<>(f -> f.value(678, new Text("irrelevant")), new DescribesAs("text1 678 text2")))); | ||
} | ||
|
||
@Test | ||
void testDescriptionCtor() | ||
{ | ||
assertThat(new TextAndValueAndText<Integer>(new Text("text1"), new Text("text2")), | ||
new AllOf<>( | ||
new Has<>(f -> f.value(678), new DescribesAs("text1 678 text2")), | ||
new Has<>(f -> f.value(678, new Text("irrelevant")), new DescribesAs("text1 678 text2")))); | ||
} | ||
} |