http://developer88.tistory.com/m/138
http://blackturtle.tistory.com/m/711821

포토샵에서 스크립트로 다 분리하는 방법입니다.


http://www.uncorkedstudios.com/blog/export-to-android-photoshop-script/


'링크모음 > Android' 카테고리의 다른 글

WeakReference 와 SoftReference 차이점  (0) 2017.09.27
안드로이드 디버깅 툴 총정리  (0) 2017.09.27
Android , View component 설계 및 내용  (0) 2017.09.12
TDD 흐름도  (0) 2017.09.08
안드로이드 소스 모음 사이트  (0) 2017.09.03

꽤 괜찮은 것 많네요.

http://download.androidhive.info/

'링크모음 > Android' 카테고리의 다른 글

Android , View component 설계 및 내용  (0) 2017.09.12
TDD 흐름도  (0) 2017.09.08
Mockito and PowerMockito 요약  (0) 2017.09.02
Dagger2 + Junit 테스트  (1) 2017.09.02
코틀린 dagger2  (0) 2017.09.02


출처 : https://raseshmori.wordpress.com/2015/01/07/mockito-and-power-mockito-cheatsheet/

@RunWith(PowerMockRunner.class) – Tell Junit that run this test using PowerMockRunner

@PrepareForTest(A.class) – This is needed when we need to test static methods of A class

AService mock = PowerMockito.mock(A.class) – Creating a mock for A class

PowerMockito.when(mock.mockedMethod()).thenReturn(value) – When mockedMethod is called in the code, then return the value specified here.

PowerMockito.doNothing().when(mock).method() – do nothing when method() is called on mock object

Mockito.verify(mock).someMethod() – Verify that someMethod was called on mock once.

Mockito.verify(mock, times(n)).someMethod() – someMethod called n number of times

Mockito.verify(mock, never()).someMethod() – someMethod called n number of times

Mockito.verify(mock, atLeastOnce()).someMethod() – self explanatory

Mockito.verify(mock, atLeast(n)).someMethod() – self explanatory

Mockito.verify(mock, atMost(n)).someMethod() – self explanatory

Static

PowerMockito.mockStatic(A.class) – mock all static methods of class A

PowerMockito.doNothing().when(A.class)
A.staticMethod(value); – Nothing to be done when staticMethod(value) is called on class A

PowerMockito.doNothing().doThrow(new IllegalStateException()).when(A.class)
A.staticMethod(value); – Throw IllegalStateException when staticMethod(value) is called on class A

//We first have to inform PowerMock that we will now verify
//the invocation of a static method by calling verifyStatic.
PowerMockito.verifyStatic();
//Then we need to inform PowerMock about the method we want to verify.
//This is done by actually invoking the static
A.staticMethod();

@Before – annotation for a method that does the set up before starting the test.

InOrder verification

//First we have to let PowerMock know that the verification order is
//going to be important. This is done by calling Mockito.inOrder and passing
//it the mocked object.
InOrder inOrder = Mockito.inOrder(mock);
//Next, we can continue our verification using the inOrder instance
//using the same technique as seen earlier.
inOrder.verify(mock).isNew();
inOrder.verify(mock).update();
inOrder.verify(mock, Mockito.never()).create();

Constructor

PowerMockito.whenNew(A.class).withArguments(mock, “msg”).thenReturn(object)

PowerMockito.verifyNew(A.class).withArguments(mock, “msg”)
PowerMockito.verifyNew(A.class, times(n)).withArguments(mock, “msg”)

The class creating an object of A will be needed to be in @PrepareForTest

Matchers

PowerMockito.when(mock.method(Mockito.startsWith(“somestring”))).thenReturn(objValue);
Assert.assertSame(objValue, mock.method(“somestring123”));
Assert.assertSame(objValue, mock.method(“somestring456”));

PowerMockito.when(mock.method(Mockito.argThat(new ArgumentMatcher){public void matches(Object obj)….}).thenReturn(value); – Use the custom matcher to match the argument and return the value specified.

Mockito.eq(value)
Mockito.matches(regex)
Mockito.anyString, anyFloat, anyDouble, anyList, and so on
Mockito.isNull
Mockito.isNotNull
Mockito.isA
Mockito.endsWith

Answer Interface

When thenReturn() is not practical, use Answer interface

PowerMockito.when(mock.method()).then(new Answer<T>() {
public T answer(InvocationOnMock invocation) {
…invocation.getArguments()….
}
});

PowerMockito.mock(A.class, Answer obj) – This will act as default answer for all the invocation on this mock object.

Spy – Partial Mocking (some methods) of classes

//Following is the syntax to create a spy using the PowerMockito.spy method.
//Notice that we have to pass an actual instance of the EmployeeService class.
//This is necessary since a spy will only mock few methods of a class and
//invoke the real methods for all methods that are not mocked.
final EmployeeService spy = PowerMockito.spy(new EmployeeService());

//Notice that we have to use the PowerMockito.doNothing().when(spy).createEmployee()
//syntax to create the spy. This is required because if we use the
//PowerMockito.when(spy.createEmployee()) syntax will result in calling
//the actual method on the spy.
//Hence, remember when we are using spies,
//always use the doNothing(), doReturn() or the //doThrow() syntax only. PowerMockito.doNothing().when(spy)
.createEmployee(employeeMock);

Mocking private methods

PowerMockito.doNothing().when(spy,
“createEmployee”, employeeMock);

PowerMockito.verifyPrivate(spy)
.invoke(“createEmployee”, employeeMock);

'링크모음 > Android' 카테고리의 다른 글

TDD 흐름도  (0) 2017.09.08
안드로이드 소스 모음 사이트  (0) 2017.09.03
Dagger2 + Junit 테스트  (1) 2017.09.02
코틀린 dagger2  (0) 2017.09.02
Android Junit 테스트 링크 모음  (0) 2017.09.01

'링크모음 > Android' 카테고리의 다른 글

안드로이드 소스 모음 사이트  (0) 2017.09.03
Mockito and PowerMockito 요약  (0) 2017.09.02
코틀린 dagger2  (0) 2017.09.02
Android Junit 테스트 링크 모음  (0) 2017.09.01
Android Junit MVP + RxJava  (0) 2017.09.01

'링크모음 > Android' 카테고리의 다른 글

Dagger2 + Junit 테스트  (1) 2017.09.02
코틀린 dagger2  (0) 2017.09.02
Android Junit MVP + RxJava  (0) 2017.09.01
안드로이드 인스턴트앱 개발 참고 링크모음  (0) 2017.08.31
Google AR 링크 정리  (0) 2017.08.30

'링크모음 > Android' 카테고리의 다른 글

코틀린 dagger2  (0) 2017.09.02
Android Junit 테스트 링크 모음  (0) 2017.09.01
안드로이드 인스턴트앱 개발 참고 링크모음  (0) 2017.08.31
Google AR 링크 정리  (0) 2017.08.30
이미지 프로세싱 튜터리어ㄹ  (0) 2017.08.30

AIA 공식 문서

https://developer.android.com/topic/instant-apps/index.html


AIA 개발적용한 예제 대표 사이트 소개

https://developers-kr.googleblog.com/2017/08/500-million-devices-now-supported-for.html?m=1


AIA 디자인 가이드

https://developer.android.com/topic/instant-apps/ux-best-practices.html


관련 해외 참고 자료

Refactoring an existing Android app to support Instant App




Android Instant Apps, step-by-step

https://medium.com/vimeo-engineering-blog/vimeo-android-instant-apps-2f8b1e94760c


Making the Domain Android App Instant 

http://tech.domain.com.au/2017/06/making-the-domain-android-app-instant-%E2%9A%A1/


AIA tourtrial

https://willowtreeapps.com/ideas/an-introduction-to-android-instant-apps

'링크모음 > Android' 카테고리의 다른 글

Google AR 링크 정리  (0) 2017.08.30
이미지 프로세싱 튜터리어ㄹ  (0) 2017.08.30
구글 스피치api 제작  (0) 2017.08.27
챗봇 만들기  (0) 2017.08.27
datBinding 작동방식  (0) 2017.08.27

http://jybaek.tistory.com/671

https://brunch.co.kr/@pilsogood/10

http://sdusb.blogspot.com/2017/08/android-databinding-6-inversebinding.html

http://pluu.github.io/blog/android/droidkaigi/2017/08/21/doridkaigi-android/

안드로이드 O의 새로운 기능 정리 링크

https://academy.realm.io/kr/posts/android-oreo-new-features/

+ Recent posts