Ejemplo n.º 1
0
        public void TestLessThanTrue(string leftString, string rightString)
        {
            FakeResourceApiVersions left  = ConvertFromString(leftString);
            FakeResourceApiVersions right = ConvertFromString(rightString);

            Assert.IsTrue(left < right);
        }
Ejemplo n.º 2
0
        public void TestLessThanOrEqualFalse(string leftString, string rightString)
        {
            FakeResourceApiVersions left  = ConvertFromString(leftString);
            FakeResourceApiVersions right = ConvertFromString(rightString);

            Assert.IsFalse(left <= right);
        }
Ejemplo n.º 3
0
        public void TestGreaterThanFalse(string leftString, string rightString)
        {
            FakeResourceApiVersions left  = ConvertFromString(leftString);
            FakeResourceApiVersions right = ConvertFromString(rightString);

            Assert.IsFalse(left > right);
        }
Ejemplo n.º 4
0
        public void EqualsMethodVersionNull()
        {
            ArmClientOptions        options = new ArmClientOptions();
            FakeResourceApiVersions version = null;

            Assert.IsFalse(options.FakeRestApiVersions().FakeResourceVersion.Equals(version));
        }
Ejemplo n.º 5
0
        public void CompareToMethodVersionObject(int expected, string version1, string version2)
        {
            FakeResourceApiVersions v1 = ConvertFromString(version1);
            FakeResourceApiVersions v2 = null;

            if (version2 != null)
            {
                v2 = ConvertFromString(version2);
            }
            Assert.AreEqual(expected, v1.CompareTo(v2));
        }
Ejemplo n.º 6
0
        public void NotEqualsOperatorStringBothNull()
        {
            FakeResourceApiVersions v1 = null;

            Assert.IsFalse(v1 != null);
        }
Ejemplo n.º 7
0
        public void EqualsOperatorStringBothNull()
        {
            FakeResourceApiVersions v1 = null;

            Assert.IsTrue(v1 == null);
        }
Ejemplo n.º 8
0
        public void GetHashCodeTest()
        {
            FakeResourceApiVersions version = FakeResourceApiVersions.Default;

            Assert.AreEqual(version.ToString().GetHashCode(), version.GetHashCode());
        }
Ejemplo n.º 9
0
        public void CompareToMethodString(int expected, string version1, string version2)
        {
            FakeResourceApiVersions v1 = version1 == "2019-12-01" ? FakeResourceApiVersions.V2019_12_01 : FakeResourceApiVersions.V2020_06_01;

            Assert.AreEqual(expected, v1.CompareTo(version2));
        }