Example usage for com.squareup.okhttp Cache isClosed

List of usage examples for com.squareup.okhttp Cache isClosed

Introduction

In this page you can find the example usage for com.squareup.okhttp Cache isClosed.

Prototype

public boolean isClosed() 

Source Link

Usage

From source file:com.squareup.picasso.OkHttp3DownloaderTest.java

License:Apache License

@Test
public void shutdownClosesCache() throws Exception {
    OkHttpClient client = new OkHttpClient();
    Cache cache = new Cache(temporaryFolder.getRoot(), 100);
    client.setCache(cache);//from   w w  w. j a  va 2 s.  c  o m
    new OkHttpDownloader(client).shutdown();
    assertThat(cache.isClosed()).isTrue();
}