コード例 #1
0
        public void It_resets_the_secret()
        {
            string oldSecret;
            string newSecret;

            var result = 0;

            using (var transaction = _database.GetTransaction())
            {
                CreateClient(client1);
                CreateClient(client2);
                var clientToReset = _clientTable.GetClientByName(client1);
                oldSecret = clientToReset.Base64Secret;
                result    = _clientTable.ResetSecret(clientToReset);
                var resetClient = _clientTable.GetClientByName(client1);
                newSecret = resetClient.Base64Secret;
                transaction.Dispose();
            }

            Assert.AreEqual(1, result);
            Assert.AreNotEqual(oldSecret, newSecret);
        }