示例#1
0
        public void EqualsMethodVersionNull()
        {
            AzureResourceManagerClientOptions options = new AzureResourceManagerClientOptions();
            FakeResourceApiVersions           version = null;

            Assert.IsFalse(options.FakeRpApiVersions().FakeResourceVersion.Equals(version));
        }
示例#2
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));
        }
示例#3
0
        public void NotEqualsOperatorStringBothNull()
        {
            FakeResourceApiVersions v1 = null;

            Assert.IsFalse(v1 != null);
        }
示例#4
0
        public void EqualsOperatorStringBothNull()
        {
            FakeResourceApiVersions v1 = null;

            Assert.IsTrue(v1 == null);
        }
示例#5
0
        public void GetHashCodeTest()
        {
            FakeResourceApiVersions version = FakeResourceApiVersions.Default;

            Assert.AreEqual(version.ToString().GetHashCode(), version.GetHashCode());
        }
示例#6
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));
        }