-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/1.x'
- Loading branch information
Showing
4 changed files
with
82 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
49 changes: 49 additions & 0 deletions
49
src/test/java/com/semanticcms/core/sitemap/SiteMapRobotsTxtServletTest.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,49 @@ | ||
/* | ||
* semanticcms-core-sitemap - Automatic sitemaps for SemanticCMS. | ||
* Copyright (C) 2023 AO Industries, Inc. | ||
* support@aoindustries.com | ||
* 7262 Bull Pen Cir | ||
* Mobile, AL 36695 | ||
* | ||
* This file is part of semanticcms-core-sitemap. | ||
* | ||
* semanticcms-core-sitemap is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* semanticcms-core-sitemap is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with semanticcms-core-sitemap. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.semanticcms.core.sitemap; | ||
|
||
import static org.junit.Assert.assertNotEquals; | ||
|
||
import java.lang.reflect.Field; | ||
import org.junit.Test; | ||
|
||
/** | ||
* Tests {@link SiteMapRobotsTxtServlet}. | ||
*/ | ||
public class SiteMapRobotsTxtServletTest { | ||
|
||
private static long getLastModified() throws ReflectiveOperationException { | ||
Field field = SiteMapRobotsTxtServlet.class.getDeclaredField("LAST_MODIFIED"); | ||
field.setAccessible(true); | ||
return (long) field.get(null); | ||
} | ||
|
||
/** | ||
* Tests {@link SiteMapRobotsTxtServlet#LAST_MODIFIED}. | ||
*/ | ||
@Test | ||
public void testLastModified() throws ReflectiveOperationException { | ||
assertNotEquals(0, getLastModified()); | ||
} | ||
} |