public Exception CreateFault(Status status)
 {
     if (status == null || status.IsSuccessful == true)
         return null;
     return new AppacitiveException(status.Message)
     {
         Code = status.Code,
         ReferenceId = status.ReferenceId,
         FaultType = status.FaultType,
         AdditionalMessages = status.AdditionalMessages == null ? null : status.AdditionalMessages.ToArray()
     };
 }
 public void WindowsExceptionFactoryTest()
 {
     App.Initialize( WindowsRT.Host, TestConfiguration.ApiKey, TestConfiguration.Environment );
     var status = new Status()
         {
             Code = "400",
             Message = "Test exception",
             FaultType = "test fault",
             ReferenceId = Guid.NewGuid().ToString()
         };
     var exceptionFactory = App.Factory.Build<IExceptionFactory>();
     var fault = exceptionFactory.CreateFault(status);
     Assert.IsNotNull(fault);
     Assert.IsInstanceOfType(fault, typeof(Appacitive.Sdk.Net45.AppacitiveException));
 }