summaryrefslogtreecommitdiffstats
path: root/TwoStepsAuthenticator.UnitTests/UsedCodesManagerTests.cs
blob: d72474c62998099399b82c30106a73ea16de5732 (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(42L, "def"));
            manager.AddCode(42L, "def");
            Assert.IsTrue(manager.IsCodeUsed(42L, "def"));
        }

    }
}