7. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/5/2018 10:30:00 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

7.1 Files compared

# Location File Last Modified
1 CRM_PE_OCT.zip\Integrations\UnitTests MedalliaTests.cs Wed Sep 19 17:58:18 2018 UTC
2 CRM_PE_OCT.zip\Integrations\UnitTests MedalliaTests.cs Mon Nov 5 02:45:47 2018 UTC

7.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 486
Changed 2 6
Inserted 0 0
Removed 0 0

7.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

7.4 Active regular expressions

No regular expressions were active.

7.5 Comparison detail

  1   using Syst em;
  2   using Micr osoft.Visu alStudio.T estTools.U nitTesting ;
  3   using VRMR est.WebApi ;
  4   using Meda llia.VEFT. Messages;
  5   using WHH. VEFT.Messa ges;
  6   using VRM. Integratio n.Serviceb us.Core;
  7   using VRM. Integratio n.Serviceb us.Extensi ons;
  8   using Syst em.IO;
  9   using Syst em.Xml;
  10  
  11   namespace  PATSRUnitT ests
  12   {
  13       [TestC lass]
  14       public  class Med alliaUnitT esting
  15       {
  16             private st atic strin g onPremis eVIMTDACSt ring = "ht tps:// URL /VEFT/VINE XT"; //VIN eXt on BAH , through  LB/RP - ht tp
  17  
  18           pr ivate stat ic WebServ iceDetails  _OnPremDA Cwsd = nul l;
  19           pr ivate stat ic Uri _on PremDACUri  = null;
  20  
  21           #r egion Init ialize
  22           [T estInitial ize]
  23           pu blic void  testInit()
  24           {
  25                _onPremD ACUri = ne w Uri(onPr emiseVIMTD ACString);
  26  
  27                _OnPremD ACwsd = ne w WebServi ceDetails( )
  28                {
  29                    Targ etURL = on PremiseVIM TDACString ,
  30                      WSUserName  = " AI ",
  31                      Password =  "
A
I"
  32                };
  33           }
  34           #e ndregion I nitialize
  35  
  36           [T estMethod]
  37           pu blic void  testCreate Interactio n() //VRMR est.WebApi .WebApiUti lity.SendR eceive<Cre ateInterac tionRespon se>(_onPre mDACUri, " CreateInte ractionReq uest", req uest, null , _OnPremD ACwsd);
  38           {
  39  
  40                var logg ing = new  MessageLog ging()
  41                {
  42                    Igno reState =  false,
  43                    MaxR etry = -1,
  44                    Mess ageName =  "CreateInt eractionRe quest",
  45                    Mess ageType =  "LOB",
  46                    Orga nizationNa me = "FTP" ,
  47                    Pare ntMessageN ame = "Uni tTest"
  48                };
  49  
  50                var requ est = new  CreateInte ractionReq uest
  51                {
  52                    Call backNumber  = "555-55 5-1234",
  53                    Cont actFirstNa me = "John ",
  54                    Cont actLastNam e = "Doe",
  55                    Date OfBirth =  "12/01/197 0",
  56                    Date OfContact  = DateTime .Now.Date. ToString() ,
  57                    Expe rienceComm ents = "LO VE IT",
  58                    Expe rienceScor e = "5",
  59                    Last Four = "12 34",
  60                    Orga nizationNa me = "FTP" ,
  61                    Surv eyID = "12 34567",
  62                    Surv eyLink = " WWW.BING.C OM",
  63                    Feed backType =  "Complime nt",
  64                    Aler tType = "H omelessnes s",
  65                    Stat ionID = "3 33",
  66                    Surv eyGroup =  "Outpatien t Survey",
  67                    Cont actEmail =  "Test@tes t.com",
  68                    Mess ageLogging  = logging
  69                };
  70                try
  71                {
  72                    Syst em.Xml.Ser ialization .XmlSerial izer seria lizer = ne w System.X ml.Seriali zation.Xml Serializer (typeof(Cr eateIntera ctionReque st));
  73                    var  xml = "";
  74  
  75                    usin g (var sww  = new Str ingWriter( ))
  76                    {
  77                         using (Xml Writer wri ter = XmlW riter.Crea te(sww))
  78                         {
  79                             serial izer.Seria lize(write r, request );
  80                             xml =  sww.ToStri ng();
  81                         }
  82  
  83                    }
  84                         var respon se = WebAp iUtility.S endReceive <CreateInt eractionRe sponse>(_o nPremDACUr i, "Create Interactio nRequest",  request,  null, _OnP remDACwsd) ;
  85  
  86                    var  test = res ponse.Exce ptionMessa ge;
  87                }
  88                catch (E xception e x)
  89                {
  90                    Cons ole.WriteL ine(ex.Mes sage);
  91                    Cons ole.WriteL ine(ex.Sta ckTrace);
  92                    Asse rt.Fail(ex .Message);
  93                }
  94           }
  95  
  96  
  97           [T estMethod]
  98           pu blic void  testMedali aFAILURES( ) //VRMRes t.WebApi.W ebApiUtili ty.SendRec eive<Creat eInteracti onResponse >(_onPremD ACUri, "Cr eateIntera ctionReque st", reque st, null,  _OnPremDAC wsd);
  99           {
  100  
  101                var logg ing = new  MessageLog ging()
  102                {
  103                    Igno reState =  false,
  104                    MaxR etry = -1,
  105                    Mess ageName =  "CreateInt eractionRe quest",
  106                    Mess ageType =  "LOB",
  107                    Orga nizationNa me = "FTP"
  108                };
  109  
  110                var requ est = new  CreateInte ractionReq uest
  111                {
  112                    Call backNumber  = "555-55 5-1234",
  113                    Cont actFirstNa me = "John ",
  114                    //Co ntactLastN ame = "Doe ",
  115                    Date OfBirth =  "12/01/197 0",
  116                    Date OfContact  = "THIS IS  NOT A DAT E",
  117                    Expe rienceComm ents = "LO VE IT",
  118                    Expe rienceScor e = "5",
  119                    Last Four = "12 34",
  120                    Orga nizationNa me = "FTP" ,
  121                    Surv eyID = "as df",
  122                    Surv eyLink = " WWW.BING.C OM",
  123                    Feed backType =  "Complime nt",
  124                    Aler tType = "H omelessnes s",
  125                    Stat ionID = "3 33",
  126                    Surv eyGroup =  "Outpatien t Survey",
  127                    Cont actEmail =  "Test@tes t.com",
  128                    Mess ageLogging  = logging
  129                };
  130                try
  131                {
  132                    var  response =  WebApiUti lity.SendR eceive<Cre ateInterac tionRespon se>(_onPre mDACUri, " CreateInte ractionReq uest", req uest, null , _OnPremD ACwsd);
  133  
  134                    var  test = res ponse.Exce ptionMessa ge;
  135                }
  136                catch (E xception e x)
  137                {
  138                    Cons ole.WriteL ine(ex.Mes sage);
  139                    Cons ole.WriteL ine(ex.Sta ckTrace);
  140                    Asse rt.Fail(ex .Message);
  141                }
  142           }
  143  
  144           // [TestMetho d]
  145           // public voi d testMeda liaLocal()  //request .SendRecei ve<CreateI nteraction Response>( MessagePro cessType.L ocal)
  146           // {
  147  
  148  
  149           //     var re quest = ne w CreateIn teractionR equest
  150           //     {
  151           //         Ca llbackNumb er = "555- 555-1234",
  152           //         Co ntactFirst Name = "Jo hn",
  153           //         Co ntactLastN ame = "Doe ",
  154           //         Da teOfBirth  = "12/01/1 970",
  155           //         Da teOfContac t = DateTi me.Now.Dat e.ToString (),
  156           //         Ex perienceCo mments = " LOVE IT",
  157           //         Ex perienceSc ore = "5",
  158           //         La stFour = " 1234",
  159           //         Or ganization Name = "FT P",
  160           //         Su rveyID = " 1234567",
  161           //         Su rveyLink =  "WWW.BING .COM",
  162           //         Fe edbackType  = "Compli ment",
  163           //         Al ertType =  "Homelessn ess",
  164           //         St ationID =  "333",
  165           //         Su rveyGroup  = "Outpati ent Survey ",
  166           //         Co ntactEmail  = "Test@t est.com"
  167           //     };
  168           //     try
  169           //     {
  170           //         va r response  = request .SendRecei ve<CreateI nteraction Response>( MessagePro cessType.L ocal);
  171  
  172           //         As sert.IsNot Null(respo nse);
  173           //         va r test = r esponse.Ex ceptionMes sage;
  174           //     }
  175           //     catch  (Exception  ex)
  176           //     {
  177           //         Co nsole.Writ eLine(ex.M essage);
  178           //         Co nsole.Writ eLine(ex.S tackTrace) ;
  179           //         As sert.Fail( ex.Message );
  180           //     }
  181           // }
  182  
  183           [T estMethod]
  184           pu blic void  TestS3Retr ieve()
  185           {
  186                try
  187                {
  188                    Retr ieveFromS3 Request re quest = ne w Retrieve FromS3Requ est()
  189                    {
  190                         MessageId  = Guid.New Guid().ToS tring(),
  191                         Organizati onName = " ftp",
  192                         MessageLog ging = new  VRM.Integ ration.Ser vicebus.Ex tensions.M essageLogg ing()
  193                         {
  194                             Ignore State = fa lse,
  195                             MaxRet ry = -1,
  196                             Messag eName = "R etrieveFro mS3Request ",
  197                             Messag eType = "L OB",
  198                             Organi zationName  = "FTP",
  199                             Parent MessageNam e = "UnitT est"
  200                         }
  201                    };
  202  
  203                    var  response =  WebApiUti lity.SendR eceive<Ret rieveFromS 3Response> (_onPremDA CUri, "Ret rieveFromS 3Request",  request,  null, _OnP remDACwsd) ;
  204                    Asse rt.AreNotE qual(null,  response) ;
  205                }
  206                catch (E xception e x)
  207                {
  208                    Cons ole.WriteL ine(ex.Mes sage);
  209                    Cons ole.WriteL ine(ex.Sta ckTrace);
  210                    Asse rt.Fail(ex .Message);
  211                }
  212           }
  213  
  214           [T estMethod]
  215           pu blic void  TestS3Put( )
  216           {
  217                try
  218                {
  219                }
  220                catch (E xception e x)
  221                {
  222                }
  223           }
  224  
  225           [T estMethod]
  226           pu blic void  testRespon seNoLoggin g()
  227           {
  228                try
  229                {
  230                    Upda teStatusRe quest requ est = new  UpdateStat usRequest( )
  231                    {
  232                         SurveyID =  "1234567" ,
  233                         Status = " Closed"
  234                    };
  235                    var  response =  WebApiUti lity.SendR eceive<Upd ateStatusR esponse>(_ onPremDACU ri, "Medal liaUpdateS tatusReque st", reque st, null,  _OnPremDAC wsd);
  236                    Asse rt.AreNotE qual(null,  response) ;
  237                }
  238                catch (E xception e x)
  239                {
  240                    Cons ole.WriteL ine(ex.Mes sage);
  241                    Cons ole.WriteL ine(ex.Sta ckTrace);
  242                    Asse rt.Fail(ex .Message);
  243                }
  244           }
  245       }
  246   }