From: Dean H. <de...@xs...> - 2004-06-08 13:33:14
|
I work in a group where we have a bunch of subsystems and the api into = each subsytem is well defined in com.avaya.api.**. We even have a tool = that guarantees com.avaya.api.** doesn't depend on the implementation = from ant-contrib project(this guarantees we can mock out the subsystem). = We naturally created our own mock objects, but this was before I knew = about mockobjects.com and jmock.org. =20 Anyways, I think what I have done with the mock objects is quite a = twist to what you have in jmock, and was wondering if you are = interested. I am very interested in combining what source I have(3 = classes or so) with what you have to come up with the best solution for = everyone involved. (My mock helpers originally come from my open source = project and are not proprietary so I can do this). I am also interested = in writing up many examples that I need for my developers on my project = such as what we do today..... 1. Mocking a listener to guarantee the contract feeds back events when = it is supposed to 2. Mocking a Timer so you don't have to do sleeps in a test case 3. Mocking a DatagramSocket, and Socket so exceptions can be thrown and = robustness of the system can be verified(ie. x, y, and z methods should = have been called on subsystems X, Y, and Z because an exception = happened. 4. Mocking out a subsystem that creates objects(that are also mock). = For example, if my interface is a Car and there is a getTrunk() and on = the Trunk object, there is a open()/close() method, I need to mock Car = and Trunk as I am mocking the whole subsystem that subsytem X interacts = with. 5. Examples of things happening on different threads and how to bring = the validation back to the JUnit thread. ie. I have seen developers in = my group abuse the assert and do asserts in the listeners which where on = a different thread than JUnit. This caused an exception to be thrown = into the subsytem and the test would pass because the validation was on = the wrong thread. 6. Throwing exceptions in a subsytem. Are you guys interested? I need to do this documentation work = somewhere, and I thought the best place would be mockobjects.com or = jmock.org. The problem is I first need to figure out what you guys can = do and what I can do. (The comment from the person that told me about = these websites was what I had was easier to use for him---I don't know = myself as I have not gotten into mockobjects.com too much yet.) At = first glance, I am just not sure where to start. I saw a javaboutique = tutorial but this didn't cover alot of stuff we do already. =20 ps. I only have about 3 classes that compose my whole library. I don't = claim these 3 classes do everything but they have covered everything all = 20 people in my group have needed for the last 3 years. We don't do = J2EE though so there may be much there I don't cover. thanks, dean |
From: Jeff M. <je...@mk...> - 2004-06-10 13:49:17
|
Sorry, dropped of for a moment there. If you've got code relating to the use of jmock you probably want to start waving it under the noses of the guys at jmock.org. On Tue, 2004-06-08 at 14:33, Dean Hiller wrote: > I work in a group where we have a bunch of subsystems and the api into > each subsytem is well defined in com.avaya.api.**. We even have a > tool that guarantees com.avaya.api.** doesn't depend on the > implementation from ant-contrib project(this guarantees we can mock > out the subsystem). We naturally created our own mock objects, but > this was before I knew about mockobjects.com and jmock.org. > Anyways, I think what I have done with the mock objects is quite a > twist to what you have in jmock, and was wondering if you are > interested. I am very interested in combining what source I have(3 > classes or so) with what you have to come up with the best solution > for everyone involved. (My mock helpers originally come from my open > source project and are not proprietary so I can do this). I am also > interested in writing up many examples that I need for my developers > on my project such as what we do today..... > > 1. Mocking a listener to guarantee the contract feeds back events when > it is supposed to > 2. Mocking a Timer so you don't have to do sleeps in a test case > 3. Mocking a DatagramSocket, and Socket so exceptions can be thrown > and robustness of the system can be verified(ie. x, y, and z methods > should have been called on subsystems X, Y, and Z because an exception > happened. > 4. Mocking out a subsystem that creates objects(that are also mock). > For example, if my interface is a Car and there is a getTrunk() and on > the Trunk object, there is a open()/close() method, I need to mock Car > and Trunk as I am mocking the whole subsystem that subsytem X > interacts with. > 5. Examples of things happening on different threads and how to bring > the validation back to the JUnit thread. ie. I have seen developers > in my group abuse the assert and do asserts in the listeners which > where on a different thread than JUnit. This caused an exception to > be thrown into the subsytem and the test would pass because the > validation was on the wrong thread. > 6. Throwing exceptions in a subsytem. > > Are you guys interested? I need to do this documentation work > somewhere, and I thought the best place would be mockobjects.com or > jmock.org. The problem is I first need to figure out what you guys > can do and what I can do. (The comment from the person that told me > about these websites was what I had was easier to use for him---I > don't know myself as I have not gotten into mockobjects.com too much > yet.) At first glance, I am just not sure where to start. I saw a > javaboutique tutorial but this didn't cover alot of stuff we do > already. > > ps. I only have about 3 classes that compose my whole library. I > don't claim these 3 classes do everything but they have covered > everything all 20 people in my group have needed for the last 3 > years. We don't do J2EE though so there may be much there I don't > cover. > thanks, > dean > -- Jeff Martin Memetic Engineer http://www.custommonkey.org/ |
From: Dean H. <de...@xs...> - 2004-06-11 02:39:50
|
yes, I tried getting on that mailing list, but had trouble. I will try again or mail the administrator. I am getting weird route error messages(I joined this list at the same time with no problems). thanks, dean ----- Original Message ----- From: "Jeff Martin" <je...@mk...> To: "Dean Hiller" <de...@xs...> Cc: "MockObjects" <moc...@li...> Sent: Thursday, June 10, 2004 7:48 AM Subject: Re: [MO-java-dev] would like to add source+do lots of exampledocumentation.... > Sorry, dropped of for a moment there. If you've got code relating to the > use of jmock you probably want to start waving it under the noses of the > guys at jmock.org. > > > On Tue, 2004-06-08 at 14:33, Dean Hiller wrote: > > I work in a group where we have a bunch of subsystems and the api into > > each subsytem is well defined in com.avaya.api.**. We even have a > > tool that guarantees com.avaya.api.** doesn't depend on the > > implementation from ant-contrib project(this guarantees we can mock > > out the subsystem). We naturally created our own mock objects, but > > this was before I knew about mockobjects.com and jmock.org. > > Anyways, I think what I have done with the mock objects is quite a > > twist to what you have in jmock, and was wondering if you are > > interested. I am very interested in combining what source I have(3 > > classes or so) with what you have to come up with the best solution > > for everyone involved. (My mock helpers originally come from my open > > source project and are not proprietary so I can do this). I am also > > interested in writing up many examples that I need for my developers > > on my project such as what we do today..... > > > > 1. Mocking a listener to guarantee the contract feeds back events when > > it is supposed to > > 2. Mocking a Timer so you don't have to do sleeps in a test case > > 3. Mocking a DatagramSocket, and Socket so exceptions can be thrown > > and robustness of the system can be verified(ie. x, y, and z methods > > should have been called on subsystems X, Y, and Z because an exception > > happened. > > 4. Mocking out a subsystem that creates objects(that are also mock). > > For example, if my interface is a Car and there is a getTrunk() and on > > the Trunk object, there is a open()/close() method, I need to mock Car > > and Trunk as I am mocking the whole subsystem that subsytem X > > interacts with. > > 5. Examples of things happening on different threads and how to bring > > the validation back to the JUnit thread. ie. I have seen developers > > in my group abuse the assert and do asserts in the listeners which > > where on a different thread than JUnit. This caused an exception to > > be thrown into the subsytem and the test would pass because the > > validation was on the wrong thread. > > 6. Throwing exceptions in a subsytem. > > > > Are you guys interested? I need to do this documentation work > > somewhere, and I thought the best place would be mockobjects.com or > > jmock.org. The problem is I first need to figure out what you guys > > can do and what I can do. (The comment from the person that told me > > about these websites was what I had was easier to use for him---I > > don't know myself as I have not gotten into mockobjects.com too much > > yet.) At first glance, I am just not sure where to start. I saw a > > javaboutique tutorial but this didn't cover alot of stuff we do > > already. > > > > ps. I only have about 3 classes that compose my whole library. I > > don't claim these 3 classes do everything but they have covered > > everything all 20 people in my group have needed for the last 3 > > years. We don't do J2EE though so there may be much there I don't > > cover. > > thanks, > > dean > > > -- > Jeff Martin > > Memetic Engineer > > http://www.custommonkey.org/ > > |