This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/master by this push:
     new c7c156910 Fix method name
c7c156910 is described below

commit c7c156910498da77886cbcdb949b7899fac67af0
Author: Konrad Windszus <[email protected]>
AuthorDate: Tue Jun 17 13:21:37 2025 +0200

    Fix method name
    
    resourceOfType -> resourceType
---
 src/main/jbake/content/documentation/development/hamcrest.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/jbake/content/documentation/development/hamcrest.md 
b/src/main/jbake/content/documentation/development/hamcrest.md
index fe6037633..ff5470efc 100644
--- a/src/main/jbake/content/documentation/development/hamcrest.md
+++ b/src/main/jbake/content/documentation/development/hamcrest.md
@@ -23,8 +23,9 @@ See latest version on the [downloads page](/downloads.cgi).
 The class 
[`org.apache.sling.testing.hamcrest.ResourceMatchers`](https://github.com/apache/sling-org-apache-sling-testing-hamcrest/blob/master/src/main/java/org/apache/sling/hamcrest/ResourceMatchers.java)
 is the main entry point. It contains static methods that can be used to create 
assertions.
 
     #!java
-    import static org.apache.sling.hamcrest.ResourceMatchers.resourceOfType;
-
+    import static import org.hamcrest.MatcherAssert.assertThat;
+    import static org.apache.sling.hamcrest.ResourceMatchers.resourceType;
+    
     public void MyServiceTest {
 
       @Test
@@ -32,7 +33,7 @@ The class 
[`org.apache.sling.testing.hamcrest.ResourceMatchers`](https://github.
         Map<String, Object> expectedProperties = /* define properties */;
         Resource resource = /* load resource */ null;
 
-        assertThat(resource, resourceOfType("my/app"));
+        assertThat(resource, resourceType("my/app"));
         assertThat(resource, hasChildren("header", "body"));
         assertThat(resource, resourceWithProps(expectedProperties));
       }

Reply via email to