[java-plugin-shibd] branch main updated: Stale test.

Scott Cantor cantor.2 at osu.edu
Tue May 14 15:25:49 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-plugin-shibd.

View the commit online:
http://git.shibboleth.net/view/?p=java-plugin-shibd.git;a=commit;h=a123f4574bca5d8e513ba1f190842797b64638f5

The following commit(s) were added to refs/heads/main by this push:
     new a123f45  Stale test.
a123f45 is described below

commit a123f4574bca5d8e513ba1f190842797b64638f5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue May 14 11:25:46 2024 -0400

    Stale test.
---
 .../sp/remoting/endpoint/impl/XMLParserTest.java   | 104 ---------------------
 1 file changed, 104 deletions(-)

diff --git a/sp-server-impl/src/test/java/net/shibboleth/sp/remoting/endpoint/impl/XMLParserTest.java b/sp-server-impl/src/test/java/net/shibboleth/sp/remoting/endpoint/impl/XMLParserTest.java
deleted file mode 100644
index 075c70f..0000000
--- a/sp-server-impl/src/test/java/net/shibboleth/sp/remoting/endpoint/impl/XMLParserTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package net.shibboleth.sp.remoting.endpoint.impl;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import net.shibboleth.shared.component.ComponentInitializationException;
-import net.shibboleth.shared.xml.XMLParserException;
-import net.shibboleth.shared.xml.impl.BasicParserPool;
-import net.shibboleth.sp.remoting.RemoteProcessingException;
-import net.shibboleth.sp.ddf.DDF;
-
-/**
- * Unit test for {@link XMLParser}.
- */
-public class XMLParserTest {
-    
-    private BasicParserPool parserPool;
-    
-    private XMLParser endpoint;
-    
-    /**
-     * Init parser.
-     * 
-     * @throws ComponentInitializationException 
-     */
-    @BeforeClass
-    public void setUp() throws ComponentInitializationException {
-        parserPool = new BasicParserPool();
-        parserPool.initialize();
-        
-        endpoint = new XMLParser();
-        endpoint.setId("test");
-        assert parserPool != null;
-        endpoint.setParserPool(parserPool);
-        endpoint.initialize();
-    }
-    
-    /**
-     * Teardown. 
-     */
-    @AfterClass
-    public void tearDown() {
-        endpoint.destroy();
-        parserPool.destroy();
-    }
-    
-    /**
-     * Test bad input type.
-     * 
-     * @throws RemoteProcessingException
-     */
-    @Test(expectedExceptions=IllegalArgumentException.class)
-    public void badInput() throws RemoteProcessingException {
-        endpoint.receive(new DDF(XMLParser.ADDRESS).string("foo"));
-    }
-
-    /**
-     * Test bad XML.
-     * 
-     * @throws RemoteProcessingException
-     */
-    @Test(expectedExceptions=RemoteProcessingException.class)
-    public void badXML() throws RemoteProcessingException {
-        endpoint.receive(new DDF(XMLParser.ADDRESS).unsafe_string("<foo".getBytes()));
-    }
-
-    /**
-     * Test conversion.
-     * 
-     * @throws IOException 
-     * @throws XMLParserException 
-     * @throws RemoteProcessingException 
-     */
-    @Test
-    public void success() throws XMLParserException, IOException, RemoteProcessingException {
-        try (final InputStream source = getClass().getResourceAsStream("shibboleth2.xml")) {
-            final DDF obj = endpoint.receive(new DDF(XMLParser.ADDRESS).unsafe_string(source.readAllBytes()));
-            
-            Assert.assertTrue(obj.isstruct());
-            Assert.assertEquals(obj.name(), "xml");
-            Assert.assertTrue(obj.getmember("SPConfig").isstruct());
-        }
-    }
-
-}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list