Nettiers.AdventureWorks.UnitTests.EmployeePayHistoryTest.Step_08_SerializeCollection_Generated C# (CSharp) Method

Step_08_SerializeCollection_Generated() private method

Serialize a EmployeePayHistory collection into a temporary file.
private Step_08_SerializeCollection_Generated ( ) : void
return void
		private void Step_08_SerializeCollection_Generated()
		{
			using (TransactionManager tm = CreateTransaction())
			{
				string fileName = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "temp_EmployeePayHistoryCollection.xml");
				
				mock = CreateMockInstance(tm);
				TList<EmployeePayHistory> mockCollection = new TList<EmployeePayHistory>();
				mockCollection.Add(mock);
			
				EntityHelper.SerializeXml(mockCollection, fileName);
				
				Assert.IsTrue(System.IO.File.Exists(fileName), "Serialized mock collection not found");
				System.Console.WriteLine("TList<EmployeePayHistory> correctly serialized to a temporary file.");					
			}
		}