/// <summary>
        /// Returns the url to the file provided
        ///
        /// For example c:\path\to\server\a\file.aspx should return http://server:port:/a/file.aspx
        /// </summary>
        /// <param name="apiCassini"></param>
        /// <param name="fileToMap"></param>
        /// <returns></returns>
        public static string url_From_File(this API_Cassini apiCassini, string fileToMap)
        {
            var webRoot = apiCassini.webRoot();

            if (fileToMap.contains(webRoot))
            {
                return(apiCassini.url(fileToMap.remove(webRoot)));
            }
            return(null);
        }
        public virtual void testFixtureSetUp()
        {
            webRoot           = this.teamMentor_Root_OnDisk() .assert_Folder_Exists();  // this points to a folder with the full TM
            path_XmlLibraries = "path_XmlLibraries".tempDir() .assert_Folder_Exists();  // this points to a temp folder

            apiCassini = new API_Cassini(webRoot)        .assert_Not_Null();
            port       = apiCassini.port()               .assert_Not_Default();
            siteUri    = apiCassini.url().uri();

            apiCassini.webRoot().assert_Equal_To(webRoot);

            port      .tcpClient().assert_Null();
            apiCassini.start();

            this.tmProxy().set_Custom_Path_XmlDatabase(path_XmlLibraries);              // configure TM to the temp path_XmlLibraries folder for all files created
        }
        public void start()
        {       
            apiCassini.assert_Null();
            webRoot   .assert_Folder_Not_Exists();
            port      .assert_Default();

            apiCassini = new API_Cassini();
            webRoot    = apiCassini.webRoot();
            port       = apiCassini.port();
                        

            webRoot   .assert_Folder_Exists();
            port      .tcpClient().assert_Null();
            apiCassini.start();
            port      .tcpClient().assert_Not_Null();
        }
        [SetUp] public void setup()
        {
            apiCassini = new API_Cassini();            

            apiCassini.webRoot().assert_Folder_Empty();
        }
 public static string mapPath(this API_Cassini apiCassini, string virtualPath)
 {
     return(apiCassini.webRoot()
            .mapPath(virtualPath));
 }