Skip to content

Commit

Permalink
Rename GetManagerUtil
Browse files Browse the repository at this point in the history
close #46
  • Loading branch information
isuPatches committed Jul 2, 2017
1 parent 716997a commit 5495cf9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import static junit.framework.Assert.*;


public class GetManagerUtilTest extends BaseTestClass<TestActivity> {
public class ManagerUtilTest extends BaseTestClass<TestActivity> {

public GetManagerUtilTest() {
public ManagerUtilTest() {
super(TestActivity.class);
}

Expand All @@ -22,25 +22,25 @@ public GetManagerUtilTest() {

@Test
public void testGetConnectivityManager() {
ConnectivityManager connectivityManager = GetManagerUtil.getInstance().getConnectivityManager(mActivityTestRule.getActivity());
ConnectivityManager connectivityManager = ManagerUtil.getInstance().getConnectivityManager(mActivityTestRule.getActivity());
assertNotNull(connectivityManager);
}

@Test
public void testGetConnectivityManagerNullActivity() {
ConnectivityManager connectivityManager = GetManagerUtil.getInstance().getConnectivityManager(null);
ConnectivityManager connectivityManager = ManagerUtil.getInstance().getConnectivityManager(null);
assertNull(connectivityManager);
}

@Test
public void testGetWiFiManager() {
WifiManager wifiManager = GetManagerUtil.getInstance().getWiFiManager(mActivityTestRule.getActivity());
WifiManager wifiManager = ManagerUtil.getInstance().getWiFiManager(mActivityTestRule.getActivity());
assertNotNull(wifiManager);
}

@Test
public void testGetWiFiManagerNullActivity() {
WifiManager wifiManager = GetManagerUtil.getInstance().getWiFiManager(null);
WifiManager wifiManager = ManagerUtil.getInstance().getWiFiManager(null);
assertNull(wifiManager);
}
}
6 changes: 3 additions & 3 deletions wisefy/src/main/java/com/isupatches/wisefy/WiseFy.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import android.net.wifi.WifiManager;
import android.text.TextUtils;
import android.util.Log;
import com.isupatches.wisefy.util.GetManagerUtil;
import com.isupatches.wisefy.util.ManagerUtil;
import com.isupatches.wisefy.util.LogUtil;
import com.isupatches.wisefy.util.SSIDUtil;
import java.util.ArrayList;
Expand Down Expand Up @@ -60,8 +60,8 @@ public class WiseFy {
*/
private WiseFy(withContext withContext) {
this.mLoggingEnabled = withContext.loggingEnabled;
this.mConnectivityManager = GetManagerUtil.getInstance().getConnectivityManager(withContext.context);
this.mWifiManager = GetManagerUtil.getInstance().getWiFiManager(withContext.context);
this.mConnectivityManager = ManagerUtil.getInstance().getConnectivityManager(withContext.context);
this.mWifiManager = ManagerUtil.getInstance().getWiFiManager(withContext.context);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
import com.isupatches.wisefy.WiseFy;


public class GetManagerUtil {
public class ManagerUtil {

private static final GetManagerUtil GET_MANAGER_UTIL = new GetManagerUtil();
private static final ManagerUtil MANAGER_UTIL = new ManagerUtil();

/**
* Private constructor with no setup
*/
private GetManagerUtil() {
private ManagerUtil() {
}

/**
* @return instance of GetManagerUtil
*/
public static GetManagerUtil getInstance() {
return GET_MANAGER_UTIL;
public static ManagerUtil getInstance() {
return MANAGER_UTIL;
}

/**
Expand Down

0 comments on commit 5495cf9

Please sign in to comment.