public decimal GetValue_NumberOfIpAddresses_CalculatesSizeCorrectly(string cidrBlock) { // arrange var sut = new VpcSubnetAlarmDataProvider(); var subnet = new Subnet { CidrBlock = cidrBlock }; // act var result = sut.GetValue(subnet, "NumberOfIpAddresses"); return(result); }
public async Task <decimal> GetValue_NumberOfIpAddresses_CalculatesSizeCorrectly(string cidrBlock) { // arrange var sut = new VpcSubnetAlarmDataProvider(); var subnet = new Subnet { CidrBlock = cidrBlock }; // act var result = await sut.GetValue(subnet, new ResourceConfig(), "NumberOfIpAddresses"); return(result); }
public void GetDimensions_ValidDimensionNames_GeneratedCorrectly() { // arrange var sut = new VpcSubnetAlarmDataProvider(); // act var result = sut.GetDimensions(new Subnet { SubnetId = "Abcd" }, new List <string> { "Subnet" }); // assert Assert.That(result.Count, Is.EqualTo(1)); Assert.That(result.First().Name, Is.EqualTo("Subnet")); Assert.That(result.First().Value, Is.EqualTo("Abcd")); }