You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(151) |
Sep
(21) |
Oct
(6) |
Nov
(70) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(47) |
Feb
(66) |
Mar
(23) |
Apr
(115) |
May
(24) |
Jun
(53) |
Jul
(10) |
Aug
(279) |
Sep
(84) |
Oct
(149) |
Nov
(138) |
Dec
(52) |
2003 |
Jan
(22) |
Feb
(20) |
Mar
(29) |
Apr
(106) |
May
(170) |
Jun
(122) |
Jul
(70) |
Aug
(64) |
Sep
(27) |
Oct
(71) |
Nov
(49) |
Dec
(9) |
2004 |
Jan
(7) |
Feb
(38) |
Mar
(3) |
Apr
(9) |
May
(22) |
Jun
(4) |
Jul
(1) |
Aug
(2) |
Sep
(2) |
Oct
|
Nov
(15) |
Dec
(2) |
2005 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
(28) |
Jun
(3) |
Jul
(11) |
Aug
(5) |
Sep
(1) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2006 |
Jan
(8) |
Feb
(3) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <moc...@li...> - 2001-11-17 10:16:59
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/sql In directory usw-pr-cvs1:/tmp/cvs-serv29129/core/com/mockobjects/sql Modified Files: MockPreparedStatement.java Log Message: minor additions to API Index: MockPreparedStatement.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/sql/MockPreparedStatement.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockPreparedStatement.java 2001/07/29 19:50:24 1.1 +++ MockPreparedStatement.java 2001/11/17 10:16:56 1.2 @@ -28,13 +28,6 @@ } } - public void verify() { - super.verify(); - mySetParameters.verify(); - myExecuteCalls.verify(); - myClearParametersCalls.verify(); - } - public void clearParameters() throws SQLException { myClearParametersCalls.inc(); } |
From: <moc...@li...> - 2001-11-17 10:16:59
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/servlet In directory usw-pr-cvs1:/tmp/cvs-serv29129/core/com/mockobjects/servlet Modified Files: MockServletOutputStream.java Log Message: minor additions to API Index: MockServletOutputStream.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/servlet/MockServletOutputStream.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockServletOutputStream.java 2001/07/29 19:50:24 1.1 +++ MockServletOutputStream.java 2001/11/17 10:16:56 1.2 @@ -1,28 +1,22 @@ package com.mockobjects.servlet; -import com.mockobjects.*; -import junit.framework.*; -import javax.servlet.*; -import java.io.*; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import javax.servlet.ServletOutputStream; +import com.mockobjects.ExpectationCounter; +import com.mockobjects.ExpectationValue; public class MockServletOutputStream extends ServletOutputStream { private ExpectationValue myWriteCalled = new ExpectationValue("MockServletOutputStream.write()"); private boolean myThrowException = false; private ExpectationCounter myCloseCallCount = new ExpectationCounter("MockServletOutputstream.close()"); - private ByteArrayOutputStream myBuffer = new ByteArrayOutputStream(); + private ByteArrayOutputStream myBuffer; public MockServletOutputStream() { super(); + setupClearContents(); } - public void close() throws IOException { - myCloseCallCount.inc(); - } - - public String getContents() { - return myBuffer.toString(); - } - public void setExpectedCloseCalls(int closeCall) { myCloseCallCount.setExpected(closeCall); } @@ -35,19 +29,31 @@ myThrowException = throwException; } - public String toString() { - return getContents(); + public void close() throws IOException { + myCloseCallCount.inc(); } - public void verify() { - myWriteCalled.verify(); - myCloseCallCount.verify(); + public String toString() { + return getContents(); } public void write(int b) throws IOException { + myWriteCalled.setActual(true); if (myThrowException) throw new IOException("Test IOException generated by request"); myBuffer.write(b); - myWriteCalled.setActual(true); + } + + public void setupClearContents () { + myBuffer = new ByteArrayOutputStream(); + } + + public String getContents() { + return myBuffer.toString(); + } + + public void verify() { + myWriteCalled.verify(); + myCloseCallCount.verify(); } } |
From: <moc...@li...> - 2001-11-17 10:16:59
|
Update of /cvsroot/mockobjects/mockobjects-java/src/examples/com/mockobjects/examples/mailinglist In directory usw-pr-cvs1:/tmp/cvs-serv29129/examples/com/mockobjects/examples/mailinglist Modified Files: TestMailingList.java Log Message: minor additions to API Index: TestMailingList.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/examples/com/mockobjects/examples/mailinglist/TestMailingList.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- TestMailingList.java 2001/08/27 02:42:54 1.10 +++ TestMailingList.java 2001/11/17 10:16:56 1.11 @@ -25,7 +25,7 @@ private MockStatement mockStatement = new MockStatement(); public void setUp() { - mockConnection.setupPreparedStatement(mockPreparedStatement); + mockConnection.setupAddPreparedStatement(mockPreparedStatement); mockConnection.setupStatement(mockStatement); } @@ -55,7 +55,7 @@ public void testPrepareStatementFailsForAdd() throws MailingListException { mockConnection.setupThrowExceptionOnPrepareOrCreate(new SQLException("MockConnection")); - mockConnection.setExpectedPrepareStatementString(MailingList.INSERT_SQL); + mockConnection.addExpectedPreparedStatementString(MailingList.INSERT_SQL); mockPreparedStatement.setExpectedExecuteCalls(0); mockPreparedStatement.setExpectedCloseCalls(0); @@ -227,7 +227,7 @@ } private void setExpectationsForPreparedStatement(String sqlStatement) { - mockConnection.setExpectedPrepareStatementString(sqlStatement); + mockConnection.addExpectedPreparedStatementString(sqlStatement); mockPreparedStatement.setExpectedExecuteCalls(1); mockPreparedStatement.setExpectedCloseCalls(1); } |
From: <moc...@li...> - 2001-11-17 09:47:48
|
RnJvbTogIkdyZWcgTWVycmlsbCIgPGdyZWdobWVycmlsbEB5YWhvby5jb20+DQo+IE15IHF1ZXN0 aW9uIHRvIHRoaXMgbGlzdCBpczogd291bGQgYW55b25lIGJlDQo+IGludGVyZXN0ZWQgaW4gYW4g b3B0aW9uY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zcw0KPiBpcyBub3QNCj4gICAgIHVzZWZ1bCBpbiBtYW55IGNhc2VzIGJl Y2F1c2Ugb2YgdGhpcyBiZWhhdmlvci4NCj4gICAgIEkgaGF2ZSB3cml0ZWQgdGhlIE1vY2tNUFND b25uZWN0aW9uIHdoaWNoIHN1cG9ydHMgdGhpcyBmZWF0dXJlIGFuZA0KPiByZXR1cm5zDQo+ICAg ICB0aGUgUHJlcGFyZWRTdGF0ZW1lbnRzIHNlcXVlbmNseSBieSBjYWxsaW5nIHByZXBhcmVTdGF0 ZW1lbnQoKSBtZXRob2QuDQo+ICAgICBJIGNhbiBwb3N0IGhlcmUgdGhlIGltcGxlbWVudGF0aW9u Lg0KDQpIYXZlIHlvdSBjaGVja2VkIHRoZSBDVlMgcmVwb3NpdG9yeT8gVGhlIHB1YmxpYyBidWls ZCBpcyBzb21ld2hhdCBvdXQgb2YgZGF0ZSwgYnV0IHRoZSByZXBvc2l0b3J5IHZlcnNpb24gc3Vw cG9ydHMgbXVsdGlwbGUgc3RhdGVtZW50cy4NCiANCldlJ3ZlIGJlZW4gYWRkaW5nIGZ1bmN0aW9u YWxpdHkgaW5jcmVtZW50YWxseSBhcyBvdXIgbmVlZHMgYXJpc2UsIGJlY2F1c2UgaXQgd291bGQg aGF2ZSB0YWtlbiBmb3JldmVyIHRvIGltcGxlbWVudCBldmVyeXRoaW5nLiBXZSdyZSB2ZXJ5IGhh cHB5IHRvIGFjY2VwdCBwYXRjaGVzIGZyb20gcGVvcGxlIHdobyBoYXZlIGFkZGl0aW9uYWwgcmVx dWlyZW1lbnRzLg0KDQpTdGV2ZQ0KDQoNCg== |
From: Vincent T. <Vin...@ge...> - 2001-11-16 21:48:46
|
One easy thing to do to complement your MockObjects testing is to test your expected SQL query string against the DB with a simple SQL query analyzer. Once you are sure of your syntax (providing that your table definition doesnt change) you can rely on MockObjects testing until functional testing. That's what we do and it hasn't reserved any bad surprise ... yet :-) -Vincent- -----Original Message----- From: moc...@li... [mailto:moc...@li...]On Behalf Of Greg Merrill Sent: Friday, November 16, 2001 4:29 PM To: moc...@li... Subject: [MO-java-dev] SQL validation I recently had a brief discussion with a couple of developers on the c2 wiki (http://c2.com/cgi/wiki?MockObject) regarding database testing & MockObjects. Here is an excerpt: <excerpt> I'm curious - for those of you out there who are using MockObjects to test JDBC code, do you typically have at least one unit test which uses a "real" database connection as a santiy check? Or do you keep live connections out of the unit testing altogether, letting this type of testing fall under the umbrella of "functional testing"? While I like the speed and focus of MockObjects for database testing, certain things about it make me nervous, e.g. SQL statements are not validated. --GregMerrill I'm currently getting big into database mock objects with VbUnitThree. I'm currently ignoring the issue of testing the real database objects. But I know this is a mistake; I'll have to come back and write unit tests for them, just like any other class. -- JeffGrigg OK, it bit me today: My unit tests didn't test the SQL, and so didn't catch a stray column. But that's OK, because the end-to-end functional tests (done in the same unit testing framework, only less often), caught the problem. No blood; no foul. (Yes, I still need to write unit tests for the SQL. I will, I will... ;-) -- jtg </excerpt> My question to this list is: would anyone be interested in an optional SQL validation feature on relevant mock sql objects (MockStatement/MockPreparedStatement)? Something along the lines of setExpectValidSQL(boolean)? When true, this property would validate the syntax of SQL statements on calls to executeUpdate() & executeQuery(). Very handy to ensure that dynamically-generated queries don't have syntax problems. I've created a prototype of such a feature, using a parser generated with JavaCC and a contributed grammar (http://www.cobase.cs.ucla.edu/pub/javacc/). It seems to work OK. (The grammar is a little Oracle-specific, but should handle standard SQL just fine.) Do you think this kind of feature would fit well in the mock objects core? Or does it seem more like an optional feature which should be released/maintained separately? And the bottom line - does basic SQL validation have a place in MockObject-style unit testing? Or should this type of responsibililty lie with functional testing, since the SQL validation which is actually done at runtime is database-dependent? -Greg Merrill __________________________________________________ Do You Yahoo!? Find the one for you at Yahoo! Personals http://personals.yahoo.com _______________________________________________ Mockobjects-java-dev mailing list Moc...@li... https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev |
From: Greg M. <gre...@ya...> - 2001-11-16 21:28:51
|
I recently had a brief discussion with a couple of developers on the c2 wiki (http://c2.com/cgi/wiki?MockObject) regarding database testing & MockObjects. Here is an excerpt: <excerpt> I'm curious - for those of you out there who are using MockObjects to test JDBC code, do you typically have at least one unit test which uses a "real" database connection as a santiy check? Or do you keep live connections out of the unit testing altogether, letting this type of testing fall under the umbrella of "functional testing"? While I like the speed and focus of MockObjects for database testing, certain things about it make me nervous, e.g. SQL statements are not validated. --GregMerrill I'm currently getting big into database mock objects with VbUnitThree. I'm currently ignoring the issue of testing the real database objects. But I know this is a mistake; I'll have to come back and write unit tests for them, just like any other class. -- JeffGrigg OK, it bit me today: My unit tests didn't test the SQL, and so didn't catch a stray column. But that's OK, because the end-to-end functional tests (done in the same unit testing framework, only less often), caught the problem. No blood; no foul. (Yes, I still need to write unit tests for the SQL. I will, I will... ;-) -- jtg </excerpt> My question to this list is: would anyone be interested in an optional SQL validation feature on relevant mock sql objects (MockStatement/MockPreparedStatement)? Something along the lines of setExpectValidSQL(boolean)? When true, this property would validate the syntax of SQL statements on calls to executeUpdate() & executeQuery(). Very handy to ensure that dynamically-generated queries don't have syntax problems. I've created a prototype of such a feature, using a parser generated with JavaCC and a contributed grammar (http://www.cobase.cs.ucla.edu/pub/javacc/). It seems to work OK. (The grammar is a little Oracle-specific, but should handle standard SQL just fine.) Do you think this kind of feature would fit well in the mock objects core? Or does it seem more like an optional feature which should be released/maintained separately? And the bottom line - does basic SQL validation have a place in MockObject-style unit testing? Or should this type of responsibililty lie with functional testing, since the SQL validation which is actually done at runtime is database-dependent? -Greg Merrill __________________________________________________ Do You Yahoo!? Find the one for you at Yahoo! Personals http://personals.yahoo.com |
From: Egor S. <sl...@ac...> - 2001-11-16 11:12:04
|
Hi all in DEV world ! I have some questions. 1. Why the MockResultSet does not handle correctly null values in methods get<primitive type>() ? Also the wasNull() method is not supported. I think it is not different to implement such things. Moreover the java.sql.ResultSet interface specification strongly defines the values, wich must be returned in null case. 2. Why the MockConnection does not supports the isClosed() method ? Once the close() method called the isClosed() method must return false. I think this is a very simle behavior. 3. The MockConnection does not supports multiply PreparedStatements setup. It always return the same PreparedStatement (if was set up). This class is not useful in many cases because of this behavior. I have writed the MockMPSConnection which suports this feature and returns the PreparedStatements sequencly by calling prepareStatement() method. I can post here the implementation. I also have writed corresponding subclasses to resolve 1st and 2nd problems, but i think that these changes must be implemented in MockResultSet and MockConnection classes. With best regards, Egor Samarkhanov (sl...@ac...) Software Engineer Actimind, Inc. tel 7-812-325-87-16 |
From: <rin...@me...> - 2001-11-16 07:24:57
|
Hello Steve, > > I have used this class for multiple events, but the only > thing I verify on > > the mock listener at that moment is the number of events > received, not the > > actual data of each event. > > Then I'd recommend taking out the stuff you don't use. Unless > someone else does. Would it be a good idea to just be able to set the expected event objects on the MockPropertyChangeListener and have the expected eventCount removed from the class? The nr of expected events should then have to match the number of event objects you add to the mock listener as expected. > > Tell me if my thoughts match yours: the > MockPropertyChangeListener maintains > > a list of EventMatch objects, in the order I expect each > event. When I add > > an EventMatch object to the mock listener, the EventMatch > object contains a > > fully configured PropertyChangeEvent as the expected event. When the > > propertyChangeEvent on the mock listener is invoked, it > takes the actual > > event and pushes it to the EventMatch object, increments > the eventCount > > expectation. A subsequent call will push the actual event > to the next > > EventMatch object in the list. Verification of the mock > listener also > > invokes the verificiation on the EventMatch objects. > > > > If this is your idea, can't a similar thing be done with an > > ExpectationCollection? Initially pushing the expected > PropertyChangeEvent > > objects as expected values and then collecting the actual values? > > Exactly. The only difference is that I would probably write a > special EventMatch class, rather than another > PropertyChangeEvent, that would let me decide how to specify > that it was equal to an incoming Event. Isn't there just only way to match an expected PropertyChangeEvent with the actual one? Or would the EventMatch class be the superclass of e.g. PropertyChangeEventMatch, ListDataEventMatch, etc... wherein the actual comparison of the expected event type with its actual value happens? Ringo |
From: Steve F. <sm...@us...> - 2001-11-15 22:07:36
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/beans In directory usw-pr-cvs1:/tmp/cvs-serv15061 Modified Files: MockPropertyChangeListener.java Log Message: fixed company name Index: MockPropertyChangeListener.java =================================================================== RCS file: /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/beans/MockPropertyChangeListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MockPropertyChangeListener.java 2001/11/14 22:28:50 1.1 +++ MockPropertyChangeListener.java 2001/11/15 22:07:33 1.2 @@ -13,7 +13,7 @@ * as well as the number of events. If you expect more than one event, only the * actual values of the last event are stored. * - * @author Ringo De Smet - <a href="http://www.mediagenix.com">MediaGeniXNV</a> + * @author Ringo De Smet - <a href="http://www.mediagenix.com">MediaGeniX NV</a> */ public class MockPropertyChangeListener extends MockObject implements PropertyChangeListener { |
From: <rin...@me...> - 2001-11-15 07:52:58
|
> I've been looking at this class. Have you actually used it > for multiple events? The reason I ask is that the value > expectation values can only accept a single value each, > although they can receive it multiple times. I have used this class for multiple events, but the only thing I verify on the mock listener at that moment is the number of events received, not the actual data of each event. > Depending on your requirements, my inclination would be to > define an EventMatch class, that implements equals() on > whatever you think is interesting, and set a list of expected > EventMatches in the Listener. Tell me if my thoughts match yours: the MockPropertyChangeListener maintains a list of EventMatch objects, in the order I expect each event. When I add an EventMatch object to the mock listener, the EventMatch object contains a fully configured PropertyChangeEvent as the expected event. When the propertyChangeEvent on the mock listener is invoked, it takes the actual event and pushes it to the EventMatch object, increments the eventCount expectation. A subsequent call will push the actual event to the next EventMatch object in the list. Verification of the mock listener also invokes the verificiation on the EventMatch objects. If this is your idea, can't a similar thing be done with an ExpectationCollection? Initially pushing the expected PropertyChangeEvent objects as expected values and then collecting the actual values? Ringo |
From: Steve F. <st...@m3...> - 2001-11-14 22:38:49
|
RnJvbTogPHJpbmdvLmRlc21ldEBtZWRpYWdlbml4LmNvbT4NCj4gSGVyZSBpcyBhIGxpdHRsZSBj b250cmlidXRpb246IGEgbW9jayBvYmplY3QgZm9yIGEgUHJvcGVydHlDaGFuZ2VMaXN0ZW5lci4N Cj4gSW4gY29ycmVzcG9uZGVuY2UgdG8gdGhlIGlvIGFuZCBzcWwgc3VicGFja2FnZXMsIEkgcHV0 IHRoaXMgY2xhc3MgaW4gYSBiZWFucw0KPiBzdWJwYWNrYWdlLCBzaW5jZSB0aGUgUHJvcGVydHlD aGFuZ2VMaXN0ZW5lciBpbnRlcmZhY2UgcmVzaWRlcyBpbg0KPiBqYXZhLmJlYW5zLg0KDQpJJ3Zl IGJlZW4gbG9va2luZyBhdCB0aGlzIGNsYXNzLiBIYXZlIHlvdSBhY3R1YWxseSB1c2VkIGl0IGZv ciBtdWx0aXBsZSBldmVudHM/IFRoZSByZWFzb24gSSBhc2sgaXMgdGhhdCB0aGUgdmFsdWUgZXhw ZWN0YXRpb24gdmFsdWVzIGNhbiBvbmx5IGFjY2VwdCBhIHNpbmdsZSB2YWx1ZSBlYWNoLCBhbHRo b3VnaCB0aGV5IGNhbiByZWNlaXZlIGl0IG11bHRpcGxlIHRpbWVzLiANCg0KRGVwZW5kaW5nIG9u IHlvdXIgcmVxdWlyZW1lbnRzLCBteSBpbmNsaW5hdGlvbiB3b3VsZCBiZSB0byBkZWZpbmUgYW4g RXZlbnRNYXRjaCBjbGFzcywgdGhhdCBpbXBsZW1lbnRzIGVxdWFscygpIG9uIHdoYXRldmVyIHlv dSB0aGluayBpcyBpbnRlcmVzdGluZywgYW5kIHNldCBhIGxpc3Qgb2YgZXhwZWN0ZWQgRXZlbnRN YXRjaGVzIGluIHRoZSBMaXN0ZW5lci4gDQoNCkFueXdheSwgSSd2ZSB0aWRpZWQgdXAgYSBmZXcg dGhpbmdzIHRvIGNvbmZvcm0gdG8gdGhlIHJlc3Qgb2YgdGhlIGxpYnJhcnkgYW5kIGNoZWNrZWQg aXQgaW4gZm9yIG5vdy4NCg0KU3RldmUNCg0K |
From: Steve F. <sm...@us...> - 2001-11-14 22:28:53
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/beans In directory usw-pr-cvs1:/tmp/cvs-serv25287 Added Files: MockPropertyChangeListener.java Log Message: New mock object --- NEW FILE: MockPropertyChangeListener.java --- package com.mockobjects.beans; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import com.mockobjects.ExpectationCounter; import com.mockobjects.ExpectationValue; import com.mockobjects.MockObject; /** * Mock object for a PropertyChangeListener. * This mock object can be used in verifying the event propagation mechanism * of beans. You can set the information you expect from a PropertyChangeEvent * as well as the number of events. If you expect more than one event, only the * actual values of the last event are stored. * * @author Ringo De Smet - <a href="http://www.mediagenix.com">MediaGeniXNV</a> */ public class MockPropertyChangeListener extends MockObject implements PropertyChangeListener { protected ExpectationValue propertyName; protected ExpectationValue oldValue; protected ExpectationValue newValue; protected ExpectationCounter eventCount; public MockPropertyChangeListener(String name) { propertyName = new ExpectationValue(name + ".propertyName"); oldValue = new ExpectationValue(name + ".oldValue"); newValue = new ExpectationValue(name + ".newValue"); eventCount = new ExpectationCounter(name + ".expectedNrOfEvents"); } public MockPropertyChangeListener() { this("MockPropertyChangeListener"); } public void propertyChange(PropertyChangeEvent event) { propertyName.setActual(event.getPropertyName()); oldValue.setActual(event.getOldValue()); newValue.setActual(event.getNewValue()); eventCount.inc(); } public void setExpectedNewValue(Object expectedNewValue) { newValue.setExpected(expectedNewValue); } public void setExpectedOldValue(Object expectedOldValue) { oldValue.setExpected(expectedOldValue); } public void setExpectedEventCount(int expectedEventCount) { eventCount.setExpected(expectedEventCount); } public void setExpectedPropertyName(String expectedPropertyName) { propertyName.setExpected(expectedPropertyName); } } |
From: Steve F. <sm...@us...> - 2001-11-14 22:14:26
|
Update of /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/beans In directory usw-pr-cvs1:/tmp/cvs-serv21394/beans Log Message: Directory /cvsroot/mockobjects/mockobjects-java/src/core/com/mockobjects/beans added to the repository |
From: Vincent M. <vm...@oc...> - 2001-11-14 08:32:08
|
----- Original Message ----- From: "Steve Freeman" <st...@m3...> To: <moc...@li...> Sent: Wednesday, November 14, 2001 12:25 AM Subject: [MO-java-dev] Re: [Mockobjects-java-dev] servlets library > If one version would do, I would be happier. > That would mean that servlet 2.1 users will see all setupXXX, setExpectedXXX for servlet api 2.2 and 2.3. Same, servlet api 2.3 users (for example) will see setupXXX and setExpectedXXX for methods that do *not* exist anymore [because deprecation works only for such an amount of time and then method is removed - not sure if any has been removed yet but if not it'll come soon enough]. I would also prefer a single version but not sure it is doable for the above reasons. That's a general question that will happen for all our mocks. The problem already exists for api that have changed in the jdk between 1.4 and 1.1. We need to find a mechanism ... I have no good solution for now to propose ... :) -Vincent > Steve > > ----- Original Message ----- > From: "Jeff Martin" <je...@mk...> > To: <moc...@li...> > Sent: Tuesday, November 13, 2001 3:02 PM > Subject: Re: [Mockobjects-java-dev] servlets library > > > > I've actually got some mock objects written against the 2.3 api, there > > not complete but they do add support for things like Filters > > > > As far as I can tell the 2.3 api is backwards compatible with the 2.1 > > version (think it's actually a requirement of the spec) so you don't > > need to versions. Although there could be reasons for it on grounds of > > causing less confusion although it is more work. > > > 2?$¡¸ÞrÛ#jözùsSX§,X¬´Ê'?ãyËl«ÚuëåSËl²<«qçè®§zØm¶>?þX¬¶Ë(º·~SàzwþX¬¶ÏåS Ëbú?s?$¡¸ÞrÛ#jö |
From: Vincent M. <vm...@oc...> - 2001-11-14 08:21:51
|
----- Original Message ----- From: "Steve Freeman" <st...@m3...> To: <moc...@li...> Sent: Wednesday, November 14, 2001 12:24 AM Subject: [MO-java-dev] Re: [Mockobjects-java-dev] build organisation > From: "Vincent Massol" <vm...@oc...> > > If I remember correctly that's what I proposed some time ago so I am more > > yes, but we didn't need it then. Now we do ;-) that's where knowledge may be stronger than XP ... ;-) [XP says YAGNI. Knowledge says : with my great experience I know that we'll need it for sure soon enough ...] > > > than happy with that :-). I would even go as far as : > > > 2?¡¸rÛjözùSX,X´Ê'?yË«uëS˲þX¶Ëº·~SzwþX¶ÏSËús?¡¸rÛjö |
From: <rin...@me...> - 2001-11-14 07:19:26
|
> > Core - If you want to use the mock JUnit extension > > j2se - Mock objects if you have the standard JDK > > j2ee - Mock objects if you have the enterprise JDK > > do you agree with Vincent that we should deliver multiple > jars? I'm still wondering about delivering everything up to > j2ee in the shipped jar and allowing people to control what > gets included when they build locally using Vincent's ant trick. Hmm... OK, one jar for Core & J2SE, but I would prefer an additional jar for the J2EE part. Please don't ask all the users to build a JAR of what they need. I would prefer to have you build *official* JAR files that make up the MockObjects thing when you do a release. Ringo |
From: Steve F. <st...@m3...> - 2001-11-14 00:38:22
|
V2UndmUgYmVlbiBnZXR0aW5nIGtpbmRhIGxhenkgYW5kIGp1c3QgY2hlY2tpbmcgc3R1ZmYgaW4g dG8gQ1ZTLiANCg0KSXQncyBhYm91dCB0aW1lIHRvIGNyZWF0ZSBhIG5ldyBkcm9wLg0KDQpTdGV2 ZQ0KDQotLS0tLSBPcmlnaW5hbCBNZXNzYWdlIC0tLS0tIA0KRnJvbTogPHJpbmdvLmRlc21ldEBt ZWRpYWdlbml4LmNvbT4NClRvOiA8bW9ja29iamVjdHMtamF2YS1kZXZAbGlzdHMuc291cmNlZm9y Z2UubmV0Pg0KU2VudDogVHVlc2RheSwgTm92ZW1iZXIgMTMsIDIwMDEgODoyNyBBTQ0KU3ViamVj dDogW01vY2tvYmplY3RzLWphdmEtZGV2XSBXaGVuIGEgbmV3IHZlcnNpb24/DQoNCg0KPiBIZWxs byBndXlzLA0KPiANCj4gSSBsb29rZWQgb24gdGhlIGZpbGVzIHNlY3Rpb24gb2YgdGhlIFNGIHBh Z2UgYW5kIGl0IG1lbnRpb25zIHRoYXQgdGhlIDAuMDENCj4gYnVpbGQgaXMgZnJvbSBBdWd1c3Qg MTIsIGFuZCB0aGUgbGF0ZXN0IGRldmVsb3BtZW50IGJ1aWxkIGlzIGV2ZW4gb2xkZXIuIENhbg0K PiBvbmUgb2YgeW91IHRlbGwgbWUgd2hlbiBJIGNhbiBleHBlY3QgYSBuZXcgb2ZmaWNpYWwgdmVy c2lvbiAoMC4wMj8pID8NCj4gDQo+IFJpbmdvDQo+IA0KPiBfX19fX19fX19fX19fX19fX19fX19f X19fX19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<vm...@oc...> - 2001-11-13 23:19:58
|
Steve, Why isn't there a MockConnection.setExpectedPrepareStatementString() in com.mockobjects.sql.MockConnection (as in your jdbc test first paper) ? I think it would be needed; otherwise, I have no way of checking the correct query string is correctly passed to the statement. My test code : statement.setExpectedQueryString("some SQL query"); statement.setExpectedExecuteCalls(1); statement.setExpectingNoSetParameters(); My code under test : PreparedStatement statement = this.connection.prepareStatement(query); ResultSet rs = statement.executeQuery(); Thanks -Vincent |
From: Jeff M. <je...@mk...> - 2001-11-13 15:03:42
|
I've actually got some mock objects written against the 2.3 api, there not complete but they do add support for things like Filters As far as I can tell the 2.3 api is backwards compatible with the 2.1 version (think it's actually a requirement of the spec) so you don't need to versions. Although there could be reasons for it on grounds of causing less confusion although it is more work. On Mon, 2001-11-12 at 22:36, Vincent Massol wrote: > Do you mean that the mocks are not complete or that the mocked api is 2.1= ? > (I'm not sure about the version but that's my guess seen that you guys we= re > using vajava when you wrote it ... :) ). >=20 > I think we should have at least 2 packages : one for servlet api 2.2 and = one > for servlet api 2.3. >=20 > you doing it Steve ... :-) >=20 > Thanks > -Vincent >=20 > ----- Original Message ----- > From: "Steve Freeman" <st...@m3...> > To: <moc...@li...> > Sent: Monday, November 12, 2001 10:18 PM > Subject: [Mockobjects-java-dev] servlets library >=20 >=20 > > I think the current implementation of servlets is a bit out of date. > Anyone object to bringing it up to date? > > > > I think the new stuff is largely additive, so there shouldn't be a > backwards compatibility issue. > > > > Steve > > > > 2=A1rjzS,=B4'y=8DuS=B2q=AEz=B6=FE=B6=BA~z=FE=B6S=9Ds=A1rj >=20 >=20 > _______________________________________________ > Mockobjects-java-dev mailing list > Moc...@li... > https://lists.sourceforge.net/lists/listinfo/mockobjects-java-dev --=20 |