This repository hosts the projects and their source codes written for various tutorials written in howtodoinjava.com.
lokeshgupta1981 / springexamples Goto Github PK
View Code? Open in Web Editor NEWInitial Commit
Initial Commit
This repository hosts the projects and their source codes written for various tutorials written in howtodoinjava.com.
@lokeshgupta1981 Hello, I have some doubts about some of your code in this library, I would like to ask, what is the function of the following code, I tried Google but still didn't understand it.
Hi,
I'm new to spring boot and testing. I was trying your sample to build my own test application but I had a problem in this section:
//when
ol__users result = Ol__userController.getAllAdminUsers();
this section for me doesn't replace the list that I had made in the test, it returns all data in the database. my sample code is written below for further information.
@Test
@Transactional
public void testFindAll(){
ol__roles role=new ol__roles();
role.setName("tests");
role.setRole("Admin");
role.setIs_master(true);
Timestamp currentSqlTimestamp = new Timestamp(System.currentTimeMillis());
ol__user user1=new ol__user("anteaaa","nejatiaan","[email protected]","anteaaaaa","12345","admin",true,role,"123",currentSqlTimestamp);
ol__user user2=new ol__user("Nooria","Rajaee","[email protected]","Nooriaa","12345","admin",true,role,"123",currentSqlTimestamp);
List<ol__user> list = new ArrayList<ol__user>();
list.addAll(Arrays.asList(user1,user2));
when(userRepository.findBydtype("admin")).thenReturn(list);
//when
ol__users result = Ol__userController.getAllAdminUsers();
//then
assertThat(result.getUsersList().size()).isEqualTo(2);
assertThat(result.getUsersList().get(0).getFirst_name())
.isEqualTo(user1.getFirst_name());
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.