use of org.ligoj.app.plugin.prov.model.ProvQuote in project plugin-prov by ligoj.
the class ProvResourceTest method update.
@Test
public void update() {
final QuoteEditionVo quote = new QuoteEditionVo();
quote.setName("name1");
quote.setDescription("description1");
quote.setLocation("region-1");
final FloatingCost cost = resource.update(subscription, quote);
checkCost(cost, 3165.4, 5615.0, false);
ProvQuote quote2 = repository.findByNameExpected("name1");
Assertions.assertEquals("description1", quote2.getDescription());
Assertions.assertEquals("region-1", quote2.getLocation().getName());
}
use of org.ligoj.app.plugin.prov.model.ProvQuote in project plugin-prov by ligoj.
the class ProvResourceTest method getKey.
@Test
public void getKey() {
Assertions.assertEquals("service:prov", resource.getKey());
// Only there for coverage of associations required by JPA
new ProvQuote().setStorages(null);
new ProvQuote().getStorages();
new ProvQuote().setInstances(null);
new ProvQuoteInstance().setStorages(null);
Rate.valueOf(Rate.GOOD.name());
ProvStorageOptimized.valueOf(ProvStorageOptimized.IOPS.name());
VmOs.valueOf(VmOs.LINUX.name());
ProvTenancy.valueOf(ProvTenancy.DEDICATED.name());
}
Aggregations