private Credential GetAccessTokenWithScopes(HashSet <string> scopes)
        {
            string target = string.Join(" ", scopes);
            var    token  = MockTestConstants.GetAccessToken();

            token.Target = target;
            return(token);
        }
        private Credential EmplaceAccessToken(JObject j, HashSet <string> scopes)
        {
            string target = string.Join(" ", scopes);
            var    token  = MockTestConstants.GetAccessToken();

            token.Target = target;
            j[target]    = StorageJsonUtils.CredentialToJson(token);
            return(token);
        }
        public void GetAccessTokenPath()
        {
            string path = "UD";

            path = Path.Combine(path, "u_" + _credentialPathManager.ToSafeFilename(MockTestConstants.GetHomeAccountId()));
            path = Path.Combine(path, "e_" + _credentialPathManager.ToSafeFilename(MockTestConstants.Environment));
            path = Path.Combine(path, "AT");
            path = Path.Combine(path, "r_" + _credentialPathManager.ToSafeFilename(MockTestConstants.Realm));
            path = Path.Combine(path, "c_" + _credentialPathManager.ToSafeFilename(MockTestConstants.ClientId) + ".bin");
            path = PathUtils.Normalize(path);

            Assert.AreEqual(path, _storageWorker.GetCredentialPath(MockTestConstants.GetAccessToken()));
        }