Source Code Analysis of Android Unit Testing Framework (2) Brief Analysis of Robolectric
In the previous chapter, we briefly analyzed the framework structure and operation principle of Mockito. We can find that although Mockito is an Android testing framework, the implementation method basically does not use Android related libraries. That is to say, I can also use Mockito directly in JAVA unit testing, and it can be used in real t ...
Posted by TNIDBMNG on Sat, 30 Mar 2019 22:15:30 -0700
ES6.6.2 uses summary-document operations
1. Document basic operations are divided into: document acquisition, deletion, update. Here are some simple tests.
2. Assume that the current ES has the following data (two).
3. Document operation source code is as follows:
package com.bas.demo;
import com.bas.util.ESUtil;
import org.elasticsearch.action.get.GetResponse;
...
Posted by roopurt18 on Wed, 27 Mar 2019 18:24:29 -0700
Detailed Use of Gradle in Android Studio
1) Basic configuration
build configuration
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
Android script
apply plugin: 'com.android.application'
Android configuration
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
}
Project structure
...
Posted by RockRunner on Wed, 27 Mar 2019 11:39:28 -0700
One-way list inversion
The inversion of one-way list is an interview question with very high frequency. I once suffered a loss on this question, but it doesn't matter. Let's study it.
First of all, the one-way characteristics of linked list:
1. Only forward can a node be found.
2. The next node address of the last node (which we usually call the next pointer) is n ...
Posted by baranwalpk on Tue, 26 Mar 2019 12:12:29 -0700
Spring Boot - Spring Boot integrates JPA (implements core interfaces and one-to-many, many-to-many)
SpringBook integrates JPA
Spring Data:
Spring Data is Spring's framework for manipulating data. Spring Data Jpa is only a module based on JPA standard operation data under Spring Data framework.
Spring Data JPA:
Data is manipulated based on JPA standards. Simplify the code that operates on the persistence layer. All you n ...
Posted by Fireglo on Mon, 25 Mar 2019 20:33:29 -0700
Spring IOC Annotation Development
Spring IOC Annotation Development
@ (Spring)[Spring, ioc, annotations]
Spring IOC Annotation Development
Annotation usage steps of Spring's IOC
Create projects to introduce jar packages
Introducing configuration files
Create related packages and classes
Give control of the class to the Spring container
Compiling test
Dependency injecti ...
Posted by fatherlyons on Sat, 23 Mar 2019 04:39:53 -0700
[Mrpc] Demo2 Server Sensing and Load Balancing Based on Zookeeper
Because servers are often maintained, it is not good to write the address of the service implementation server directly in the client (including the configuration file). A better way is to register your address in the ZooKeeper cluster when the server starts up, and then the client can get a list of all servers when it starts up, and choose a ...
Posted by Zeceer on Thu, 21 Mar 2019 15:57:51 -0700
Data Structure-Linear Table (2)
Chain Storage and Implementation of Linear List
Another way to implement linear tables is chain storage, which uses pointers to connect the units that store data elements in linear tables in turn. This method avoids the disadvantage of using continuous cells to store elements in arrays, so it is no longer necessary to move elements to make roo ...
Posted by kjl-php on Thu, 21 Mar 2019 09:12:52 -0700
springboot~mockMvc and asciidoctor generate API documents based on TDD
API document is a necessary condition for rapid development of front-end and back-end to reduce communication costs. It is necessary to have a perfect document. The advantage of generating document by testing is that there are test data, test return results, and these fields can be explained clearly. In spring boot framework, when using mockMvc ...
Posted by ProblemHelpPlease on Tue, 05 Feb 2019 01:24:16 -0800
Android Studio uses Gradle to organize clearer packaging scripts
Preface
When we first wrote gradle scripts, we usually wrote all the packaged scripts in the build.gradle file, which is easy to cause problems.
Dependent version duplication of build.gradle configuration or inconsistency of compileSdkVersion of multiple modules in the project;
It will lead to some dependency duplication and confl ...
Posted by franklyn on Sun, 03 Feb 2019 01:45:15 -0800