static public PlayReadyDomain FindSingleDomain(Guid guidAccountId) { TestLogger.LogMessage("Enter DomainManagement.FindSingleDomain()"); TestLogger.LogMessage("Creating PlayReadyDomainIterable..."); PlayReadyDomainIterable domainIterable = new PlayReadyDomainIterable(guidAccountId); foreach (PlayReadyDomain dom in domainIterable) { DumpDomainValues(dom); } PlayReadyDomain domain = null; IEnumerable <IPlayReadyDomain> domainEnumerable = domainIterable; int domainCount = Enumerable.Count <IPlayReadyDomain>(domainEnumerable); TestLogger.LogMessage("domain count :" + domainCount); if (domainCount > 0) { domain = Enumerable.ElementAt <IPlayReadyDomain>(domainEnumerable, 0) as PlayReadyDomain; } TestLogger.LogMessage("Leave DomainManagement.FindSingleDomain()"); return(domain); }
void VerifyDomainShouldNotExist(Guid guidAccountId) { PlayReadyDomain domain = DomainManagement.FindSingleDomain(guidAccountId); if (domain == null) { TestLogger.LogMessage("Domain not found!!!"); TestActionFinished(true, null); } else { TestLogger.LogMessage("Domain found!!!"); TestActionFinished(false, null); } }
static public void DumpDomainValues(PlayReadyDomain domain) { TestLogger.LogMessage(" "); TestLogger.LogMessage("Domain values:"); TestLogger.LogMessage("AccountId :" + domain.AccountId.ToString()); TestLogger.LogMessage("ServiceId :" + domain.ServiceId.ToString()); TestLogger.LogMessage("Revision :" + domain.Revision); TestLogger.LogMessage("FriendlyName :" + domain.FriendlyName); Uri uri = domain.DomainJoinUrl; if (uri != null) { TestLogger.LogMessage("DomainJoinUrl :" + uri.ToString()); } TestLogger.LogMessage(" "); }
void VerifyDomainShouldExist(Guid guidAccountId, Guid guidServiceId) { PlayReadyDomain domain = DomainManagement.FindSingleDomain(guidAccountId); if (domain == null) { TestLogger.LogMessage("Domain not found!!!"); TestActionFinished(false, null); } else { if (domain.ServiceId == guidServiceId) { TestLogger.LogMessage("Matching domain found in license store!!!"); TestActionFinished(true, null); } else { TestLogger.LogMessage("Matching domain not found in license store!!!"); TestActionFinished(false, null); } } }