Class ResourceFile
java.lang.Object
org.springframework.aot.test.generator.file.DynamicFile
org.springframework.aot.test.generator.file.ResourceFile
- All Implemented Interfaces:
org.assertj.core.api.AssertProvider<ResourceFileAssert>
public final class ResourceFile
extends DynamicFile
implements org.assertj.core.api.AssertProvider<ResourceFileAssert>
DynamicFile that holds resource file content and provides
ResourceFileAssert support.- Since:
- 6.0
- Author:
- Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.static ResourceFileof(String path, CharSequence charSequence) Factory method to create a newResourceFilefrom the givenCharSequence.static ResourceFileof(String path, WritableContent writableContent) Factory method to create a newSourceFilefrom the givenWritableContent.Methods inherited from class org.springframework.aot.test.generator.file.DynamicFile
equals, getContent, getPath, hashCode, toString, toString
-
Method Details
-
of
Factory method to create a newResourceFilefrom the givenCharSequence.- Parameters:
path- the relative path of the file ornullto have the path deducedcharSequence- a file containing the source contents- Returns:
- a
ResourceFileinstance
-
of
Factory method to create a newSourceFilefrom the givenWritableContent.- Parameters:
path- the relative path of the file ornullto have the path deducedwritableContent- the content to write to the file- Returns:
- a
SourceFileinstance
-
assertThat
Deprecated.useassertThat(sourceFile)rather than calling this method directly.AssertJassertThatsupport.- Specified by:
assertThatin interfaceorg.assertj.core.api.AssertProvider<ResourceFileAssert>
-
assertThat(sourceFile)rather than calling this method directly.