Ejemplo n.º 1
0
        public void EqualsToTier(bool expected, ArmSkuTier tier1, ArmSkuTier tier2)
        {
            ArmSku sku1 = new ArmSku(null, tier1, null, null, null);
            ArmSku sku2 = new ArmSku(null, tier2, null, null, null);

            Assert.AreEqual(expected, sku1.Equals(sku2), "Skus did not match expected equals");
            Assert.AreEqual(expected, sku1.GetHashCode() == sku2.GetHashCode(), $"Hashcodes comparison was expect {expected} but was {!expected}, ({sku1.GetHashCode()}, {sku2.GetHashCode()})");
        }
Ejemplo n.º 2
0
        public void EqualsToCapacity(bool expected, int?capacity1, int?capacity2)
        {
            ArmSku sku1 = capacity1 == null ? new ArmSku(null, null, null, null, null) : new ArmSku(null, null, null, null, capacity1);
            ArmSku sku2 = capacity2 == null ? new ArmSku(null, null, null, null, null) : new ArmSku(null, null, null, null, capacity2);

            Assert.AreEqual(expected, sku1.Equals(sku2), "Skus did not match expected equals");
            Assert.AreEqual(expected, sku1.GetHashCode() == sku2.GetHashCode(), $"Hashcodes comparison was expect {expected} but was {!expected}, ({sku1.GetHashCode()}, {sku2.GetHashCode()})");
        }