//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFormatRFC1123() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFormatRFC1123() { // given string input = "Mon, 15 Aug 2005 15:52:01 +0000"; // when string output = RFC1123.FormatDate(RFC1123.ParseTimestamp(input)); // then assertEquals(input, output); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldParseRFC1123() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldParseRFC1123() { // given string input = "Mon, 15 Aug 2005 15:52:01 +0000"; // when DateTime result = RFC1123.ParseTimestamp(input); // then _calendar = new DateTime(result); assertEquals(DayOfWeek.Monday, _calendar.DayOfWeek); assertEquals(15, _calendar.Day); assertEquals(8, _calendar.Month); assertEquals(2005, _calendar.Year); assertEquals(15, _calendar.Hour); assertEquals(52, _calendar.Minute); assertEquals(1, _calendar.Second); }