Skip to content

Commit f59f692

Browse files
committed
Added tests
1 parent b8ffe8c commit f59f692

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/test/java/org/fogbowcloud/manager/core/plugins/compute/azure/TestAzureComputePlugin.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,30 @@ public class TestAzureComputePlugin {
4848

4949
private static final String TOKEN_DEFAULT_ACCESS_ID = "accessId";
5050
private static final String TOKEN_DEFAULT_USERNAME = "token";
51+
52+
@Test(expected=IllegalArgumentException.class)
53+
public void testConstructorWithoutMaxVCPU() {
54+
Properties properties = new Properties();
55+
properties.setProperty("compute_azure_max_ram", "1024");
56+
properties.setProperty("compute_azure_max_instances", "1");
57+
new AzureComputePlugin(properties);
58+
}
59+
60+
@Test(expected=IllegalArgumentException.class)
61+
public void testConstructorWithoutMaxRAM() {
62+
Properties properties = new Properties();
63+
properties.setProperty("compute_ec2_azure_vcpu", "1");
64+
properties.setProperty("compute_ec2_azure_instances", "1");
65+
new AzureComputePlugin(properties);
66+
}
67+
68+
@Test(expected=IllegalArgumentException.class)
69+
public void testConstructorWithoutMaxInstances() {
70+
Properties properties = new Properties();
71+
properties.setProperty("compute_ec2_azure_vcpu", "1");
72+
properties.setProperty("compute_ec2_azure_ram", "1024");
73+
new AzureComputePlugin(properties);
74+
}
5175

5276
@Test(expected = UnsupportedOperationException.class)
5377
public void testBypass() {

0 commit comments

Comments
 (0)