Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37517
| From | Stanimir Stamenkov <s7an10@netscape.net> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: How to install mockito into Eclipse? |
| Date | 2017-10-01 15:34 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <oqqnd6$gqd$1@dont-email.me> (permalink) |
| References | <oqnot0$ban$1@gioia.aioe.org> |
On Sat, 30 Sep 2017 17:41:48 +0800, _Xue Feng_ wrote: > I am learning how to using mockito to test. I want to use > mockito within Eclipse. I have two questions about how to install > the mockito library: > 1. I have downloaded mockito-all-1.9.5.jar, and added it to the > java build path of a project within Eclipse. The tests works well. > But, when using new mockito-core-2.x.jar(it seems that > mockito-all-2.x.jar does not release any more), there are some > libraries to be install additionally to make mockito work. That is > to say, mockito depends these libraries. But, I have no idea which > libraries are needed, and the documents of mockito have no > suggestions about it. > 2. For every project, I have to add the jar of mockito into the > java build path within Eclipse. Is there any way to set the mockito > to be default library for each project created newly, just like junit? Use Maven or Gradle to declare your project dependencies: http://site.mockito.org/#how http://search.maven.org/#artifactdetails|org.mockito|mockito-core|2.10.0|jar Make sure you have Maven and/or Gradle support added to your Eclipse installation: https://www.eclipse.org/m2e https://www.eclipse.org/buildship Your Eclipse package likely comes with Maven support, already: https://www.eclipse.org/downloads/compare.php -- Stanimir
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
How to install mockito into Eclipse? Xue Feng <xf.lotus@yahoo.com> - 2017-09-30 17:41 +0800 Re: How to install mockito into Eclipse? Stanimir Stamenkov <s7an10@netscape.net> - 2017-10-01 15:34 +0300
csiph-web