public void GetSendMailJobDataAndMetaDataTest()
        {
            MailMessage  mailMessage      = new MailMessage("*****@*****.**", "*****@*****.**", "subject", "body");
            MailSettings optionalSettings = null;         // TODO: Initialize to an appropriate value
            string       jobData          = string.Empty; // TODO: Initialize to an appropriate value
            string       jobDataExpected  = string.Empty; // TODO: Initialize to an appropriate value
            string       metaData         = string.Empty; // TODO: Initialize to an appropriate value
            string       metaDataExpected = string.Empty; // TODO: Initialize to an appropriate value

            JobBuilder.GetSendMailJobDataAndMetaData(mailMessage, optionalSettings, out jobData, out metaData);

            var newmsg = new SerializableMailMessageWrapper(jobData).GetBase();

            Assert.AreEqual(jobDataExpected, jobData);
            Assert.AreEqual(metaDataExpected, metaData);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
예제 #2
0
 static void Main(string[] args)
 {
     using (AccessPointClient client = new AccessPointClient())
     {
         var job = client.CreateJob(new CreateJobRequest
         {
             Data     = "bob",
             MetaData =
                 JobBuilder.CreateBasicHttpSoap_BasicCallbackJobMetaData(
                     "metaData",
                     "http://*****:*****@b.com", "*****@*****.**"), null, out data, out metadata);
         var job3 = client.ScheduleJob(new ScheduleJobRequest
         {
             Data             = data,
             MetaData         = metadata,
             Type             = typeof(SendMailJob).AssemblyQualifiedName,
             QueueId          = 1,
             CalendarSchedule = new CalendarSchedule
             {
                 ScheduleType = typeof(BackgroundWorkerService.Logic.DataModel.Scheduling.CalendarSchedule).AssemblyQualifiedName,                         //Must set this
                 DaysOfWeek   = new List <DayOfWeek> {
                     DayOfWeek.Monday
                 }.ToArray(),
                 StartDateTime = DateTime.Now,
                 StartDailyAt  = new TimeOfDay {
                     Hour = 0, Minute = 30, Second = 0
                 },
             }
         });
         var job4 = client.CreateJob(new CreateJobRequest
         {
             Data     = "",
             MetaData =
                 JobBuilder.GetWebRequestJobMetaData(
                     "http://localhost:2048/default.aspx",
                     System.Net.HttpStatusCode.OK,
                     true).Serialize(),
             Type            = typeof(WebRequestJob).AssemblyQualifiedName,
             QueueId         = 0,
             DeleteWhenDone  = false,
             SuppressHistory = false,
             Name            = "Ping Service WebUI",
             Description     = "This pings the web ui to check whether it's still running.",
         });
     }
 }