summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCJ Buchmann <cj.buchmann@sendgrid.com>2012-01-06 16:12:26 -0800
committerCJ Buchmann <cj.buchmann@sendgrid.com>2012-01-06 16:12:26 -0800
commitea3c83f83d9bde9fdb562994d6aab858d8fabb34 (patch)
tree9350ccd44d99e6ca58a8b6927c83db69e07410b9
parent24ad1b3dc7384093d5b9bf74cef21e595c978833 (diff)
downloadsendgrid-csharp-ea3c83f83d9bde9fdb562994d6aab858d8fabb34.zip
sendgrid-csharp-ea3c83f83d9bde9fdb562994d6aab858d8fabb34.tar.gz
sendgrid-csharp-ea3c83f83d9bde9fdb562994d6aab858d8fabb34.tar.bz2
initial unit tests for header
-rwxr-xr-xSendGrid/SendGrid/Header.cs56
-rwxr-xr-xSendGrid/SendGrid/SendGrid.cs301
-rwxr-xr-xSendGrid/Tests/TestHeader.cs25
3 files changed, 382 insertions, 0 deletions
diff --git a/SendGrid/SendGrid/Header.cs b/SendGrid/SendGrid/Header.cs
new file mode 100755
index 0000000..42a538f
--- /dev/null
+++ b/SendGrid/SendGrid/Header.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Mail;
+using System.Text;
+
+namespace SendGrid
+{
+ public class Header : IHeader
+ {
+ public void AddTo(IEnumerable<string> recipients)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddSubVal(string tag, IEnumerable<string> substitutions)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddUniqueIdentifier(IDictionary<string, string> identifiers)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void SetCategory(string category)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Enable(string filter)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Disable(string filter)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddFilterSetting(string filter, IEnumerable<string> settings, string value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddHeader(MailMessage mime)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AsJson()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SendGrid/SendGrid/SendGrid.cs b/SendGrid/SendGrid/SendGrid.cs
new file mode 100755
index 0000000..966dc6d
--- /dev/null
+++ b/SendGrid/SendGrid/SendGrid.cs
@@ -0,0 +1,301 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Mail;
+using System.Text;
+
+namespace SendGrid
+{
+ public class SendGrid : ISendGrid
+ {
+ public SendGrid(IHeader header)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string From
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string To
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Cc
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Bcc
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Subject
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public IHeader Header
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Html
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Text
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Transport
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public string Date
+ {
+ get { throw new NotImplementedException(); }
+ set { throw new NotImplementedException(); }
+ }
+
+ public MailMessage CreateMimeMessage()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddTo(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddCc(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddBcc(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(string address)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(IEnumerable<string> addresses)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(IDictionary<string, string> addresssInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddRcpts(IEnumerable<IDictionary<string, string>> addressesInfo)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddSubVal(string tag, string value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddAttachment(string filePath)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void AddAttachment(Attachment attachment)
+ {
+ throw new NotImplementedException();
+ }
+
+ public string GetMailFrom()
+ {
+ throw new NotImplementedException();
+ }
+
+ public IEnumerable<string> GetRecipients()
+ {
+ throw new NotImplementedException();
+ }
+
+ public string Get(string field)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Set(string field, string value)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableGravatar()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableOpenTracking()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableClickTracking()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableSpamCheck()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableUnsubscribe()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableFooter()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableGoogleAnalytics()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableTemplate()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableBcc()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void DisableBipassListManaement()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableGravatar()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableOpenTracking()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableClickTracking(string text = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableSpamCheck(int score = 5, string url = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableUnsubscribe(string text, string html, string replace, string url, string landing)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableFooter(string text = null, string html = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableGoogleAnalytics(string source, string medium, string term, string content = null, string campaign = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableTemplate(string html = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableBcc(string email = null)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void EnableBipassListManaement()
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Mail()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SendGrid/Tests/TestHeader.cs b/SendGrid/Tests/TestHeader.cs
new file mode 100755
index 0000000..323e394
--- /dev/null
+++ b/SendGrid/Tests/TestHeader.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Moq;
+using NUnit.Framework;
+using SendGrid;
+
+namespace Tests
+{
+ [TestFixture]
+ public class TestHeader
+ {
+ [Test]
+ public void TestAddTo()
+ {
+ var foo = new Mock<IHeader>();
+ foo.Setup(m => m.Enable("foo"));
+
+ var bar = new SendGrid.SendGrid(foo.Object);
+ Assert.AreEqual(1, 2, "I suck");
+
+ }
+ }
+}