25 lines
592 B
C#
25 lines
592 B
C#
// Copyright (c) 2020 Tudor Stanciu
|
|
|
|
using Tuitio.Application.Services;
|
|
using Xunit;
|
|
|
|
namespace Tuitio.Application.Tests
|
|
{
|
|
public class HashingServiceTests
|
|
{
|
|
[Fact]
|
|
public void HashSha256_ShouldReturnCorrectHash()
|
|
{
|
|
// Arrange
|
|
var expected = "9B8769A4A742959A2D0298C36FB70623F2DFACDA8436237DF08D8DFD5B37374C";
|
|
var hashingService = new HashingService();
|
|
|
|
// Act
|
|
var actual = hashingService.HashSha256("pass123");
|
|
|
|
// Assert
|
|
Assert.Equal(expected, actual);
|
|
}
|
|
}
|
|
}
|