本文整理汇总了C#中UfXtract.Utilities.Rfc3389DateTime类的典型用法代码示例。如果您正苦于以下问题:C# Rfc3389DateTime类的具体用法?C# Rfc3389DateTime怎么用?C# Rfc3389DateTime使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Rfc3389DateTime类属于UfXtract.Utilities命名空间,在下文中一共展示了Rfc3389DateTime类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test_03
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" );
}
示例2: Test_02
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: Test_04
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: Test_01
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: Test_03
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: Test_03
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: Test_05
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" );
}
示例8: Test_01
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: Test_04
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: Test_04
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: Test_02
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" );
}
示例12: Test_06
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" );
}
示例13: Test_05
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" );
}
示例14: Test_04
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" );
}
示例15: Test_03
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" );
}