Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
vashishthask authored Sep 2, 2023
1 parent 225e141 commit f52ae41
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ Here's the required dependency
<dependency>
<groupId>in.malonus.mocktail</groupId>
<artifactId>mocktail-core</artifactId>
<version>1.0.1</version>
<version>1.0.4</version>
</dependency>
```
and required maven plugin
```xml
<plugin>
<artifactId>mocktail-maven-plugin</artifactId>
<groupId>in.malonus.mocktail</groupId>
<version>1.0.1</version>
<version>1.0.4</version>
</plugin>
```
# Steps in Setting up Mocktail
Expand All @@ -47,7 +47,7 @@ Include mocktail-core lib
<dependency>
<groupId>in.malonus.mocktail</groupId>
<artifactId>mocktail-core</artifactId>
<version>1.0.1</version>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
Expand All @@ -64,7 +64,7 @@ Include mocktail-maven-plugin and aspectj-maven-plugin
<plugin>
<artifactId>mocktail-maven-plugin</artifactId>
<groupId>in.malonus.mocktail</groupId>
<version>1.0.1</version>
<version>1.0.4</version>
<configuration>
<mode>recording_new</mode>
</configuration>
Expand Down Expand Up @@ -142,11 +142,12 @@ Through mocktail.xml we get to know which methods to consider for response cachi
```java
@Test
public void testSomething(){
MethodMocktail methodMocktail = new MethodMocktail(this);
// search with recording mode
UserDetail userDetail = userDao.get(1L);
assertNotNull(userDetail);
assertThat(10, is(userDetail.getAge()));
try(MethodMocktail methodMocktail = new MethodMocktail(this);){
// search with recording mode
UserDetail userDetail = userDao.get(1L);
assertNotNull(userDetail);
assertThat(10, is(userDetail.getAge()));
}
}
```

Expand Down Expand Up @@ -246,11 +247,12 @@ Mocktail gets to know about a joinpoint if an instance of MocktailMethod exists
```java
@Test
public void testSomething(){
MethodMocktail methodMocktail = new MethodMocktail(this);
// search with recording mode
UserDetail userDetail = userDao.get(1L);
assertNotNull(userDetail);
assertThat(10, is(userDetail.getAge()));
try(MethodMocktail methodMocktail = new MethodMocktail(this);){
// search with recording mode
UserDetail userDetail = userDao.get(1L);
assertNotNull(userDetail);
assertThat(10, is(userDetail.getAge()));
}
}
```

Expand Down

0 comments on commit f52ae41

Please sign in to comment.