@Test public void testResolving() { StorageAccountSkuType result = underTest.resolveFromAzureDiskType(pair.getAzureDiskType()); Assert.assertEquals(pair.getExpectedStorageAccountSkuType().name(), result.name()); }
public StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type) { StorageAccountSkuType result = null; if (type != null) { String[] typeComponents = type.value().split("_"); String prefix = ""; if (typeComponents[0].toUpperCase().contains("STANDARD")) { prefix = "STANDARD"; } else if (typeComponents[0].toUpperCase().contains("PREMIUM")) { prefix = "PREMIUM"; } result = StorageAccountSkuType.fromSkuName(SkuName.fromString(prefix + "_" + typeComponents[typeComponents.length - 1])); } return result; }
SkuTypeResolver { public StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type) { StorageAccountSkuType result = null; if (type != null) { String[] typeComponents = type.value().split("_"); String prefix = ""; if (typeComponents[0].toUpperCase().contains("STANDARD")) { prefix = "STANDARD"; } else if (typeComponents[0].toUpperCase().contains("PREMIUM")) { prefix = "PREMIUM"; } result = StorageAccountSkuType.fromSkuName(SkuName.fromString(prefix + "_" + typeComponents[typeComponents.length - 1])); } return result; } }
SkuTypeResolver { public StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type) { StorageAccountSkuType result = null; if (type != null) { String[] typeComponents = type.value().split("_"); String prefix = ""; if (typeComponents[0].toUpperCase().contains("STANDARD")) { prefix = "STANDARD"; } else if (typeComponents[0].toUpperCase().contains("PREMIUM")) { prefix = "PREMIUM"; } result = StorageAccountSkuType.fromSkuName(SkuName.fromString(prefix + "_" + typeComponents[typeComponents.length - 1])); } return result; }  }
SkuTypeResolver { public StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type) { StorageAccountSkuType result = null; if (type != null) { String[] typeComponents = type.value().split("_"); String prefix = ""; if (typeComponents[0].toUpperCase().contains("STANDARD")) { prefix = "STANDARD"; } else if (typeComponents[0].toUpperCase().contains("PREMIUM")) { prefix = "PREMIUM"; } result = StorageAccountSkuType.fromSkuName(SkuName.fromString(prefix + "_" + typeComponents[typeComponents.length - 1])); } return result; }  StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type); }
SkuTypeResolver { public StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type) { StorageAccountSkuType result = null; if (type != null) { String[] typeComponents = type.value().split("_"); String prefix = ""; if (typeComponents[0].toUpperCase().contains("STANDARD")) { prefix = "STANDARD"; } else if (typeComponents[0].toUpperCase().contains("PREMIUM")) { prefix = "PREMIUM"; } result = StorageAccountSkuType.fromSkuName(SkuName.fromString(prefix + "_" + typeComponents[typeComponents.length - 1])); } return result; }  StorageAccountSkuType resolveFromAzureDiskType(AzureDiskType type);  }