summaryrefslogtreecommitdiffstats
path: root/TwoStepsAuthenticator.UnitTests/UsedCodesManagerTests.cs
blob: 15ae91eb3ba0300b9efeb7c8af14e10aa61983d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;

namespace TwoStepsAuthenticator.UnitTests {
    
    [TestFixture]
    public class UsedCodesManagerTests {

        [Test]
        public void Can_add_codes() {
            var manager = new UsedCodesManager();

            Assert.IsFalse(manager.IsCodeUsed(42uL, "def"));
            manager.AddCode(42uL, "def");
            Assert.IsTrue(manager.IsCodeUsed(42uL, "def"));
        }

    }
}