Esempio n. 1
0
    public void GenerateTokenForNewPlayer()
    {
        IPlayersRepository playersRepository = new PlayersRepository(this.moqDbContext.Object);
        var testPlayer = new Player()
        {
            Id = Guid.NewGuid(), Name = "TestName"
        };
        var testKey = Encoding.ASCII.GetBytes("The secret must be long");

        string token = playersRepository.GenerateToken(testPlayer, testKey);

        Assert.IsNotNull(token);
        Assert.IsNotEmpty(token);
    }