spring-junit Questions
7
I have a jUnit Test that has its own properties file(application-test.properties) and its spring config file(application-core-test.xml).
One of the method uses an object instantiated by spring co...
Mindimindless asked 6/10, 2015 at 15:58
2
Solved
I'm trying to use Junit 5 on a spring-boot 2.x project to test a Controller.
The following works fine
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import...
Alluring asked 14/4, 2018 at 17:17
2
Solved
Following is the service.
@Service
public class MyService {
public List<Integer> getIds(Filter filter){
// Method body
}
}
And a configuration class.
@Configuration
public static class My...
Phobe asked 5/1, 2015 at 12:49
3
Solved
I have a controller with constructor injection
@RestController
@RequestMapping("/user")
public class MainController {
private final UserMapper userMapper; // autowired by constructor below
pub...
Edgington asked 19/3, 2017 at 8:28
2
Solved
I have a test class which loads a test spring application context, now I want to create a junit rule which will setup some test data in mongo db. For this I created a rule class.
public class Mon...
Pageantry asked 28/7, 2016 at 4:34
2
Solved
We are executing Junit suite for Spring-Hibernate based application( using spring text conext Unit testing framework).and using ANT for building and below Hibernate Jars are there in build path .
...
Chiu asked 19/9, 2013 at 17:20
3
I am getting an exception when my column name contains hyphen "-"
Entity : this is the entity name.
@Entity
@Table(name = "RequestHeader")
public class RequestHeader implements Serializable { ...
Demi asked 27/4, 2015 at 20:48
1
Solved
i am trying to run full package of junit test classes, and i have an audit classes for my domain classes as follows:
@PrePersist
public void prePersist(AuditableEntity e) {
UserService userSer...
Howzell asked 10/5, 2014 at 9:49
1
I have an integration test class annotated as follows
@WebAppConfiguration
@ContextConfiguration(classes = {AppConfiguration.class})
@RunWith(SpringJUnit4ClassRunner.class)
public class CacheCons...
Denature asked 31/3, 2014 at 22:4
1
© 2022 - 2024 — McMap. All rights reserved.