@Test public void testFactoryGenericMatchProvider() { UserInfoProvider openIdProvider = ProviderFactory.getOpenIdProvider("GENERIC"); assertTrue(openIdProvider.getClass() == UserInfoProvider.class); }
public static UserInfoProvider getOpenIdProvider(String providerType) { UserInfoProvider openIdProvider; String s = providerType.toUpperCase(); if (s.equals("AZURE")) { openIdProvider = new AzureAD(); } else { openIdProvider = new UserInfoProvider(); } return openIdProvider; }
ProviderFactory { public static UserInfoProvider getOpenIdProvider(String providerType) { UserInfoProvider openIdProvider; String s = providerType.toUpperCase(); if (s.equals("AZURE")) { openIdProvider = new AzureAD(); } else { openIdProvider = new UserInfoProvider(); } return openIdProvider; } }
ProviderFactory { public static UserInfoProvider getOpenIdProvider(String providerType) { UserInfoProvider openIdProvider; String s = providerType.toUpperCase(); if (s.equals("AZURE")) { openIdProvider = new AzureAD(); } else { openIdProvider = new UserInfoProvider(); } return openIdProvider; }  }
ProviderFactory { public static UserInfoProvider getOpenIdProvider(String providerType) { UserInfoProvider openIdProvider; String s = providerType.toUpperCase(); if (s.equals("AZURE")) { openIdProvider = new AzureAD(); } else { openIdProvider = new UserInfoProvider(); } return openIdProvider; }  static UserInfoProvider getOpenIdProvider(String providerType); }
ProviderFactory { public static UserInfoProvider getOpenIdProvider(String providerType) { UserInfoProvider openIdProvider; String s = providerType.toUpperCase(); if (s.equals("AZURE")) { openIdProvider = new AzureAD(); } else { openIdProvider = new UserInfoProvider(); } return openIdProvider; }  static UserInfoProvider getOpenIdProvider(String providerType);  }