extended Servlet API mocks for Servlet 3.0 forward compatibility as far as possible; made MockHttpServletResponse compatible with Servlet 3.0 getHeader(s) method returning Strings (SPR-8529); added getHeaderValue(s) method to MockHttpServletResponse for raw value access
This commit is contained in:
parent
c0e429a9a5
commit
cc725d7e5c
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2007 the original author or authors.
|
* Copyright 2002-2011 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
package org.springframework.mock.web;
|
package org.springframework.mock.web;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @author Chris Beams
|
* @author Chris Beams
|
||||||
|
|
@ -89,16 +89,4 @@ public class MockServletContextTests {
|
||||||
assertEquals(4, sc.getMinorVersion());
|
assertEquals(4, sc.getMinorVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testIllegalMinorVersion() {
|
|
||||||
MockServletContext sc = new MockServletContext();
|
|
||||||
assertEquals(5, sc.getMinorVersion());
|
|
||||||
try {
|
|
||||||
sc.setMinorVersion(2);
|
|
||||||
fail("expected expection for illegal argument");
|
|
||||||
}
|
|
||||||
catch (IllegalArgumentException iae) {
|
|
||||||
// expected
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue