public void Test_SerialiseAnObject()
        {
            //---------------Set up test pack-------------------
            TrySerialisable trySerial = new TrySerialisable();
            const string    dataFile  = _dataFileName;
            // Construct a BinaryFormatter and use it
            // to serialize the data to the stream.
            BinaryFormatter formatter = new BinaryFormatter();

            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            // Serialize the BO.
            using (FileStream fs = new FileStream(dataFile, FileMode.Create))
            {
                formatter.Serialize(fs, trySerial);
            }
            //---------------Test Result -----------------------
            AssertFileHasBeenCreated(dataFile);
        }
 public void Test_SerialiseAnObject()
 {
     //---------------Set up test pack-------------------
     TrySerialisable trySerial = new TrySerialisable();
     const string dataFile = _dataFileName;
     // Construct a BinaryFormatter and use it 
     // to serialize the data to the stream.
     BinaryFormatter formatter = new BinaryFormatter();
     //---------------Assert Precondition----------------
     //---------------Execute Test ----------------------
     // Serialize the BO.
     using (FileStream fs = new FileStream(dataFile, FileMode.Create))
     {
         formatter.Serialize(fs, trySerial);
     }
     //---------------Test Result -----------------------
     AssertFileHasBeenCreated(dataFile);
 }