-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAct-Deact.cs
25 lines (24 loc) · 956 Bytes
/
Act-Deact.cs
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
//Deactive
[TestMethod]
public async Task {repo_name}_Deactive()
{
var result = await repository.Deactive(CreatGuid("NewGuid"));
var {repo_name}AfterDel = await DbContext.{repo_name}
.Where(cg => cg.Id == CreatGuid("NewGuid")
.AsNoTracking()
.FirstOrDefaultAsync();
Assert.AreEqual(true, {repo_name}AfterDel.Disabled);
Assert.IsTrue(result);
}
//Active
[TestMethod]
public async Task {repo_name}_Active()
{
var result = await repository.Active(CreatGuid("NewGuid"));
var {repo_name}AfterDel = await DbContext.{repo_name}
.Where(cg => cg.Id == CreatGuid("NewGuid"))
.AsNoTracking()
.FirstOrDefaultAsync();
Assert.AreEqual(false, {repo_name}AfterDel.Disabled);
Assert.IsTrue(result);
}