public void TestGetBadgeDefinitions()
 {
     try
     {
         SecurityContextHolder.Credential = WsSessionClient.ProductionInstance().CreateSession(Username, Password);
         var authenticationProvider = new WSSessionAuthenticationProvider();
         var client = IdCardClientImpl.DevelopmentInstance(authenticationProvider);
         var badgeDefinitions = client.GetBadgeDefinitions();
         Console.WriteLine(badgeDefinitions);
     }
     finally
     {
         WsSessionClient.ProductionInstance().DestroySession(SecurityContextHolder.Credential as Session);
     }
 }
 public void TestGetCardTemplate()
 {
     try
     {
         SecurityContextHolder.Credential = WsSessionClient.ProductionInstance().CreateSession(Username, Password);
         var authenticationProvider = new WSSessionAuthenticationProvider();
         var client = IdCardClientImpl.DevelopmentInstance(authenticationProvider);
         client.GetTemplate(1L);
         string fileName = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\IdCardProduction\templates\BYUIdCard.zip";
         Console.WriteLine("The File: " + fileName + " exists(" + File.Exists(fileName) + ").");
     }
     finally
     {
         WsSessionClient.ProductionInstance().DestroySession(SecurityContextHolder.Credential as Session);
     }
 }