private void SetupAzureServers(IAzureSubscriptionContext sub, IEnumerable <IAzureSqlServerResource> servers) { Func <IAzureResourceManagementSession, bool> isExpectedSub = (session) => { return(session.SubscriptionContext == sub); }; ResourceManagerMock.Setup(r => r.GetSqlServerAzureResourcesAsync( It.Is <IAzureResourceManagementSession>((session) => isExpectedSub(session)) )).Returns(() => Task.FromResult(servers)); }
public bool Equals(IAzureSubscriptionContext other) { return(other != null && other.Equals(this)); }
/// <summary> /// Returns true if given subscription equals this class /// </summary> public bool Equals(IAzureSubscriptionContext other) { return((other == null && Subscription == null) || (other != null && other.Subscription.Equals(Subscription))); }