Ejemplo n.º 1
0
    public async Task Should_Get_Content_Of_A_Sent_Email()
    {
      // Setup
      string apiKey = ConfigurationManager.AppSettings["APIKey"];
      string sentEmailId = ConfigurationManager.AppSettings["SentEmailId"];
      string sentEmailSubject = ConfigurationManager.AppSettings["SentEmailSubject"];
      string sentEmailText = ConfigurationManager.AppSettings["SentEmailText"];

      // Exercise
      var api = new MandrillApi(apiKey);

      Content response = await api.GetContent(new ContentRequest(sentEmailId));

      Assert.AreEqual(sentEmailSubject, response.Subject);
      Assert.AreEqual(sentEmailText, response.Text);
    }
Ejemplo n.º 2
0
        public async Task Should_Get_Content_Of_A_Sent_Email()
        {
            // Setup
            string apiKey           = ConfigurationManager.AppSettings["APIKey"];
            string sentEmailId      = ConfigurationManager.AppSettings["SentEmailId"];
            string sentEmailSubject = ConfigurationManager.AppSettings["SentEmailSubject"];
            string sentEmailText    = ConfigurationManager.AppSettings["SentEmailText"];

            // Exercise
            var api = new MandrillApi(apiKey);

            Content response = await api.GetContent(new ContentRequest(sentEmailId));

            Assert.AreEqual(sentEmailSubject, response.Subject);
            Assert.AreEqual(sentEmailText, response.Text);
        }