Consistent handling of AssertProvider implementations
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,10 +42,9 @@ class ResourceFileTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void assertThatReturnsResourceFileAssert() {
|
||||
ResourceFile file = ResourceFile.of("path", "test");
|
||||
assertThat(file.assertThat()).isInstanceOf(ResourceFileAssert.class);
|
||||
void assertThatUsesResourceFileAssert() {
|
||||
ResourceFile file = ResourceFile.of("path", appendable -> appendable.append("test"));
|
||||
assertThat(file).hasContent("test");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -106,10 +106,9 @@ class SourceFileTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
void assertThatReturnsAssert() {
|
||||
void assertThatUseSourceFileAssert() {
|
||||
SourceFile sourceFile = SourceFile.of(HELLO_WORLD);
|
||||
assertThat(sourceFile.assertThat()).isInstanceOf(SourceFileAssert.class);
|
||||
assertThat(sourceFile).hasContent(HELLO_WORLD);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user