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

Step_08_SerializeCollection_Generated() private method

Serialize a ProductVendor 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_ProductVendorCollection.xml");
				
				mock = CreateMockInstance(tm);
				TList<ProductVendor> mockCollection = new TList<ProductVendor>();
				mockCollection.Add(mock);
			
				EntityHelper.SerializeXml(mockCollection, fileName);
				
				Assert.IsTrue(System.IO.File.Exists(fileName), "Serialized mock collection not found");
				System.Console.WriteLine("TList<ProductVendor> correctly serialized to a temporary file.");					
			}
		}