-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGiangVienChucVuTest.cs
191 lines (155 loc) · 4.78 KB
/
GiangVienChucVuTest.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#region Using directives
using System;
using System.Xml;
using System.Xml.Serialization;
using NUnit.Framework;
using PMS.Entities;
using PMS.Data;
#endregion
namespace PMS.UnitTests
{
/// <summary>
/// Provides tests for the and <see cref="GiangVienChucVu"/> objects (entity, collection and repository).
/// </summary>
/// <remarks>
/// This file is generated once and will never be overwritten.
/// </remarks>
[TestFixture]
public partial class GiangVienChucVuTest
{
/// <summary>
/// Creates a new <see cref="GiangVienChucVuTest"/> instance.
/// </summary>
public GiangVienChucVuTest()
{
}
/// <summary>
/// This method is used to construct the test environment prior to running the tests.
/// </summary>
[TestFixtureSetUp]
public void Init()
{
Init_Generated();
// Add your initialization here
}
/// <summary>
/// This method is used to restore the environment after the tests are completed.
/// </summary>
[TestFixtureTearDown]
public void Dispose()
{
CleanUp_Generated();
// Add you clean up here
}
/// <summary>
/// Selects a sample of GiangVienChucVu objects of the database.
/// </summary>
[NUnit.Framework.Test]
public void Step_02_SelectAll()
{
// Establish additional pre-conditions here
Step_02_SelectAll_Generated();
// Add additional verification here
}
/// <summary>
/// Deep load all GiangVienChucVu children.
/// </summary>
[NUnit.Framework.Test]
public void Step_03_DeepLoad()
{
// Establish additional pre-conditions here
Step_03_DeepLoad_Generated();
// Add additional verification here
}
#region Serialization tests
/// <summary>
/// Serialize the mock GiangVienChucVu entity into a temporary file.
/// </summary>
[NUnit.Framework.Test]
public void Step_06_SerializeEntity()
{
// Establish additional pre-conditions here
Step_06_SerializeEntity_Generated();
// Add additional verification here
}
/// <summary>
/// Deserialize the mock GiangVienChucVu entity from a temporary file.
/// </summary>
[NUnit.Framework.Test]
public void Step_07_DeserializeEntity()
{
// Establish additional pre-conditions here
Step_07_DeserializeEntity_Generated();
// Add additional verification here
}
/// <summary>
/// Serialize a GiangVienChucVu collection into a temporary file.
/// </summary>
[NUnit.Framework.Test]
public void Step_08_SerializeCollection()
{
// Establish additional pre-conditions here
Step_08_SerializeCollection_Generated();
// Add additional verification here
}
/// <summary>
/// Deserialize a GiangVienChucVu collection from a temporary file.
/// </summary>
[NUnit.Framework.Test]
public void Step_09_DeserializeCollection()
{
// Establish additional pre-conditions here
Step_09_DeserializeCollection_Generated();
// Add additional verification here
}
#endregion
/// <summary>
/// Test methods exposed by the EntityHelper class.
/// </summary>
[NUnit.Framework.Test]
public void Step_20_TestEntityHelper()
{
Step_20_TestEntityHelper_Generated();
}
/// <summary>
/// Test Find using the Query class
/// </summary>
[NUnit.Framework.Test]
public void Step_30_TestFindByQuery()
{
Step_30_TestFindByQuery_Generated();
}
///<summary>
/// Returns a Typed GiangVienChucVu Entity with mock values.
///</summary>
static public GiangVienChucVu CreateMockInstance(TransactionManager tm)
{
// get the default mock instance
GiangVienChucVu mock = GiangVienChucVuTest.CreateMockInstance_Generated(tm);
// make any alterations necessary
// (i.e. for DB check constraints, special test cases, etc.)
SetSpecialTestData(mock);
// return the modified object
return mock;
}
///<summary>
/// Update the Typed GiangVienChucVu Entity with modified mock values.
///</summary>
static public void UpdateMockInstance(TransactionManager tm, GiangVienChucVu mock)
{
GiangVienChucVuTest.UpdateMockInstance_Generated(tm, mock);
// make any alterations necessary
// (i.e. for DB check constraints, special test cases, etc.)
SetSpecialTestData(mock);
}
/// <summary>
/// Make any alterations necessary (i.e. for DB check constraints, special test cases, etc.)
/// </summary>
/// <param name="mock">Object to be modified</param>
static private void SetSpecialTestData(GiangVienChucVu mock)
{
//Code your changes to the data object here.
}
}
}