-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitTest1.cs
More file actions
31 lines (27 loc) · 836 Bytes
/
UnitTest1.cs
File metadata and controls
31 lines (27 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;
using EncryptService.Models;
using System.Collections.Generic;
namespace UnitTestProject
{
[TestClass]
public class UnitTest1
{
/// <summary>
/// Тестирование метода щифолвания с помощью linq
/// </summary>
[TestMethod]
public void TestEncryptWithLinq()
{
//arrange
string text = "привет";
EFDbContext db = new EFDbContext();
//act
var list = text.Where(t => db.EncryptModels.Any(m => m.OldSymbol.Equals(t)));
string resString = String.Join("", list);
//assert
Assert.AreEqual("поцэъм", resString);
}
}
}