Пример #1
0
 public void Test_03()
 {
     // vcard[0].rev
     string test = nodes.GetNameByPosition("vcard", 0).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2008-01-01T13:45:00").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find rev value even if class attribute has multiple values" );
 }
 public void Test_02()
 {
     // vevent[0].dtend
     string test = nodes.GetNameByPosition("vevent", 0).Nodes["dtend"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2009-06-26T22:12:34").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "With the value class pattern the results should contain a time" );
 }
Пример #3
0
 public void Test_04()
 {
     // vevent[3].dtstart
     string test = nodes.GetNameByPosition("vevent", 3).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01T21:30").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - Year, month, day and time");
 }
Пример #4
0
 public void Test_01()
 {
     // vevent[0].dtstart
     string test = nodes.GetNameByPosition("vevent", 0).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - Year");
 }
Пример #5
0
 public void Test_03()
 {
     // vcard[2].rev
     string test = nodes.GetNameByPosition("vcard", 2).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("20070501T1130").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - ISO standard date format" );
 }
Пример #6
0
 public void Test_03()
 {
     // vcard[0].bday
     string test = nodes.GetNameByPosition("vcard", 0).Nodes["bday"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2000-01-01T00:00:00-0800").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The bday (birthday) is a singular value");
 }
Пример #7
0
 public void Test_05()
 {
     // vcard[4].rev
     string test = nodes.GetNameByPosition("vcard", 4).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01T21:30Z").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - UTC Year, month, day and time" );
 }
 public void Test_01()
 {
     // vevent[0].dtstart
     string test = nodes.GetNameByPosition("vevent", 0).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2009-06-05T20:00").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "With the value class pattern the results should contain a date and time" );
 }
Пример #9
0
 public void Test_04()
 {
     // vevent[0].dtend
     string test = nodes.GetNameByPosition("vevent", 0).Nodes["dtend"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-09-09").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The dtend is a singular value");
 }
Пример #10
0
 public void Test_04()
 {
     // vevent[3].dtstart
     string test = nodes.GetNameByPosition("vevent", 3).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("20070501T113015").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - ISO standard date format" );
 }
Пример #11
0
 public void Test_05()
 {
     // vevent[4].dtstart
     string test = nodes.GetNameByPosition("vevent", 4).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("20070501T113015Z").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - uppercase punctuation" );
 }
Пример #12
0
 public void Test_01()
 {
     // vevent[0].dtstart
     string test = nodes.GetNameByPosition("vevent", 0).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-06-16T09:00:00+00:00").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The included dtstart value" );
 }
Пример #13
0
 public void Test_02()
 {
     // vevent[1].dtstart
     string test = nodes.GetNameByPosition("vevent", 1).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("20080121").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - ISO extended date format" );
 }
Пример #14
0
 public void Test_06()
 {
     // vcard[5].bday
     string test = nodes.GetNameByPosition("vcard", 5).Nodes["bday"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01T21:30+08:00").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The bday or birthday from a HTML5 time element" );
 }
Пример #15
0
 public void Test_03()
 {
     // vcard[2].rev
     string test = nodes.GetNameByPosition("vcard", 2).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - Year, month and day" );
 }
Пример #16
0
 public void Test_05()
 {
     // vevent[3].dtstart
     string test = nodes.GetNameByPosition("vevent", 3).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The dtstart from a HTML5 time element" );
 }
Пример #17
0
 public void Test_04()
 {
     // vevent[2].dtend
     string test = nodes.GetNameByPosition("vevent", 2).Nodes["dtend"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2008-08-18T16:00:00-01").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The dtend from a HTML5 time element" );
 }
Пример #18
0
 public void Test_03()
 {
     // hresume[0].education[0].dtend
     string test = nodes.GetNameByPosition("hresume", 0).Nodes.GetNameByPosition("education", 0).Nodes["dtend"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("1992").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The dtend value from hCalendar" );
 }
Пример #19
0
 public void IsotoISO(string input, string iso)
 {
     Rfc3389DateTime dateTime = new Rfc3389DateTime(input);
     Assert.That(dateTime.ToString(), Is.EqualTo(iso), "Format - " + input);
 }
Пример #20
0
 public void Test_10()
 {
     // vevent[0].last-modified
     string test = nodes.GetNameByPosition("vevent", 0).Nodes["last-modified"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-02").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The last-modified is a singular value");
 }
Пример #21
0
 public void Test_07()
 {
     // vevent[6].dtstart
     string test = nodes.GetNameByPosition("vevent", 6).Nodes["dtstart"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01T113025").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - mixed punctuation" );
 }
Пример #22
0
 public void Test_06()
 {
     // vcard[0].rev
     string test = nodes.GetNameByPosition("vcard", 0).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2008-01-01T13:45:00").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "The rev is a singular value");
 }
Пример #23
0
 public void Test_07()
 {
     // vcard[6].rev
     string test = nodes.GetNameByPosition("vcard", 6).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01T21:30+08:00").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - Year, month, day and time with time zone offset" );
 }
Пример #24
0
 public void ISOtoDotNet( string input, DateTime date )
 {
     Rfc3389DateTime dateTime = new Rfc3389DateTime(input);
     DateTime rfc = dateTime.ToDateTime();
     Assert.That(rfc, Is.EqualTo(date), "Format - " + input );
 }
Пример #25
0
 public void Test_09()
 {
     // vcard[8].rev
     string test = nodes.GetNameByPosition("vcard", 8).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("2007-05-01T21:30:00.0150").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - Year, month, day and time with decimal fraction of a second" );
 }
Пример #26
0
 public void Test_08()
 {
     // vcard[7].rev
     string test = nodes.GetNameByPosition("vcard", 7).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("20070501T11:30:25").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - mixed punctuation" );
 }
Пример #27
0
 public void Test_06()
 {
     // vcard[5].rev
     string test = nodes.GetNameByPosition("vcard", 5).Nodes["rev"].Value;
     string testDateTime = new Rfc3389DateTime(test).ToString();
     string resultDateTime = new Rfc3389DateTime("20070501t113025z").ToString();
     Assert.That(testDateTime, Is.EqualTo(resultDateTime), "Should find a date from text node - lowercase punctuation" );
 }