public void VersionExist() { ArmClientOptions options = new ArmClientOptions(); options.FakeRestApiVersions().FakeResourceVersion = FakeResourceApiVersions.V2019_12_01; string result = options.ApiVersions.TryGetApiVersion(options.FakeRestApiVersions().FakeResourceVersion.ResourceType); Assert.NotNull(result); }
public void ImplicitToString() { ArmClientOptions options = new ArmClientOptions(); options.FakeRestApiVersions().FakeResourceVersion = FakeResourceApiVersions.V2019_12_01; string version = options.FakeRestApiVersions().FakeResourceVersion; Assert.IsTrue(version == "2019-12-01"); }
public void MultiClientSeparateVersions() { ArmClientOptions options1 = new ArmClientOptions(); ArmClientOptions options2 = new ArmClientOptions(); options2.FakeRestApiVersions().FakeResourceVersion = FakeResourceApiVersions.V2019_12_01; Assert.AreEqual(FakeResourceApiVersions.Default, options1.FakeRestApiVersions().FakeResourceVersion); Assert.AreEqual(FakeResourceApiVersions.V2019_12_01, options2.FakeRestApiVersions().FakeResourceVersion); }
public void VersionLoadedChanges() { ArmClientOptions options = new ArmClientOptions(); options.FakeRestApiVersions().FakeResourceVersion = FakeResourceApiVersions.V2019_12_01; string result = options.ApiVersions.TryGetApiVersion(options.FakeRestApiVersions().FakeResourceVersion.ResourceType); Assert.True(result.Equals(FakeResourceApiVersions.V2019_12_01)); options.FakeRestApiVersions().FakeResourceVersion = FakeResourceApiVersions.Default; result = options.ApiVersions.TryGetApiVersion(options.FakeRestApiVersions().FakeResourceVersion.ResourceType.ToString()); Assert.True(result.Equals(FakeResourceApiVersions.Default)); }
public void VersionsLoadedChangeSet() { ArmClientOptions options = new ArmClientOptions(); options.ApiVersions.SetApiVersion(options.FakeRestApiVersions().FakeResourceVersion.ResourceType.ToString(), "2021-01-01-beta"); string result = options.ApiVersions.TryGetApiVersion(options.FakeRestApiVersions().FakeResourceVersion.ResourceType.ToString()); Assert.True(result.Equals("2021-01-01-beta")); options.FakeRestApiVersions().FakeResourceVersion = FakeResourceApiVersions.V2019_12_01; result = options.ApiVersions.TryGetApiVersion(options.FakeRestApiVersions().FakeResourceVersion.ResourceType.ToString()); Assert.True(result.Equals(FakeResourceApiVersions.V2019_12_01)); }
public void EqualsMethod() { ArmClientOptions options1 = new ArmClientOptions(); ArmClientOptions options2 = new ArmClientOptions(); Assert.IsTrue(options1.FakeRestApiVersions().FakeResourceVersion.Equals(options2.FakeRestApiVersions().FakeResourceVersion)); }
public void NotEqualsOperator() { ArmClientOptions options1 = new ArmClientOptions(); ArmClientOptions options2 = new ArmClientOptions(); Assert.IsFalse(options1.FakeRestApiVersions().FakeResourceVersion != options2.FakeRestApiVersions().FakeResourceVersion); }
public void EqualsMethodStringNull() { ArmClientOptions options = new ArmClientOptions(); string version = null; Assert.IsFalse(options.FakeRestApiVersions().FakeResourceVersion.Equals(version)); }
public void EqualsMethodAsObjectThatIsInt() { ArmClientOptions options = new ArmClientOptions(); object obj = 1; Assert.IsFalse(options.FakeRestApiVersions().FakeResourceVersion.Equals(obj)); }
public void EqualsMethodAsObjectThatIsString() { ArmClientOptions options1 = new ArmClientOptions(); ArmClientOptions options2 = new ArmClientOptions(); object obj = options2.FakeRestApiVersions().FakeResourceVersion.ToString(); Assert.IsTrue(options1.FakeRestApiVersions().FakeResourceVersion.Equals(obj)); }
public void VersionIsDefault() { ArmClientOptions options = new ArmClientOptions(); Assert.AreEqual(FakeResourceApiVersions.Default, options.FakeRestApiVersions().FakeResourceVersion); }
public void VersionToString() { ArmClientOptions options = new ArmClientOptions(); Assert.AreEqual("2020-06-01", options.FakeRestApiVersions().FakeResourceVersion); }
public void NotEqualsOperatorStringSecondNull() { ArmClientOptions options = new ArmClientOptions(); Assert.IsTrue(options.FakeRestApiVersions().FakeResourceVersion != null); }
public void NotEqualsOperatorStringFirstNull() { ArmClientOptions options = new ArmClientOptions(); Assert.IsTrue(null != options.FakeRestApiVersions().FakeResourceVersion); }
public void EqualsOperatorString() { ArmClientOptions options = new ArmClientOptions(); Assert.IsTrue(FakeResourceApiVersions.Default == options.FakeRestApiVersions().FakeResourceVersion); }