Commits

Anonymous committed 9bedc1e

Improved Unit Test. One test fails.

  • Participants
  • Parent commits 53a3c6d

Comments (0)

Files changed (2)

File BlueGo.suo

Binary file modified.

File BlueGo/UnitTest.cs

         public class DownloadTest
         {
             [Test]
-            public void Add()
-            {
-                int i = 3 + 2;
-
-                Assert.AreEqual(i, 5);
-            }
-
-            [Test]
             public void DownloadBoost()
             {
-                eBoostVersion boostVersion = eBoostVersion.Boost1_52_0;
+                try
+                {
+                    eBoostVersion boostVersion = eBoostVersion.Boost1_52_0;
                 
-                string destinationFolder = @"C:\UnitTest\";
+                    string destinationFolder = @"C:\UnitTest\";
                 
-                if (!Directory.Exists(destinationFolder))
+                    if (!Directory.Exists(destinationFolder))
+                    {
+                        Directory.CreateDirectory(destinationFolder);
+                    }
+
+                    string boostDownloadURL = BoostInfo.GetBoostDownloadURL(boostVersion);
+                    string boostZIPFilename = BoostInfo.GetBoostZipFileName(boostVersion);
+
+                    // Download boost
+                    // Check if URL is valid
+                    bool validUrl = DownloadHelper.RemoteFileExists(boostDownloadURL);
+                    Assert.True(validUrl);
+
+                    DownloadHelper.DownloadFileFromURL(boostDownloadURL,  destinationFolder + boostZIPFilename);
+                }
+                catch (System.Exception ex)
                 {
-                    Directory.CreateDirectory(destinationFolder);
+                    Assert.True(false);	
                 }
-
-                string boostDownloadURL = BoostInfo.GetBoostDownloadURL(boostVersion);
-                string boostZIPFilename = BoostInfo.GetBoostZipFileName(boostVersion);
-
-                // Download boost
-                // Check if URL is valid
-                bool validUrl = DownloadHelper.RemoteFileExists(boostDownloadURL);
-                Assert.True(validUrl);
-
-                DownloadHelper.DownloadFileFromURL(boostDownloadURL,  destinationFolder + boostZIPFilename);
+              
             }
         }
     }