Skip to content

Commit

Permalink
Fix property naming in IcsFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Rian Stockbower committed Nov 10, 2017
1 parent ca7ca03 commit c5c1b6c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 28 deletions.
14 changes: 7 additions & 7 deletions net-core/Ical.Net/Ical.Net.UnitTests/AlarmTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void Alarm1()
new CalDateTime(2006, 7, 18, 9, 30, 0, _tzid)
});

var content = IcsFiles.ALARM1;
var content = IcsFiles.Alarm1;
TestAlarm(content, dateTimes, new CalDateTime(2006, 7, 1, _tzid), new CalDateTime(2006, 9, 1, _tzid));
}

Expand All @@ -61,7 +61,7 @@ public void Alarm2()
new CalDateTime(2006, 8, 5, 9, 30, 0, _tzid)
});

var content = IcsFiles.ALARM2;
var content = IcsFiles.Alarm2;
TestAlarm(content, dateTimes, new CalDateTime(2006, 7, 1, _tzid), new CalDateTime(2006, 9, 1, _tzid));
}

Expand All @@ -78,7 +78,7 @@ public void Alarm3()
new CalDateTime(2000, 10, 11, 9, 0, 0, _tzid)
});

var content = IcsFiles.ALARM3;
var content = IcsFiles.Alarm3;
TestAlarm(content, dateTimes, new CalDateTime(1997, 1, 1, _tzid), new CalDateTime(2000, 12, 31, _tzid));
}

Expand Down Expand Up @@ -110,7 +110,7 @@ public void Alarm4()
new CalDateTime(2000, 10, 11, 15, 0, 0, _tzid)
});

var content = IcsFiles.ALARM4;
var content = IcsFiles.Alarm4;
TestAlarm(content, dateTimes, new CalDateTime(1997, 1, 1, _tzid), new CalDateTime(2000, 12, 31, _tzid));
}

Expand All @@ -123,7 +123,7 @@ public void Alarm5()
new CalDateTime(1998, 1, 2, 8, 0, 0, _tzid)
});

var content = IcsFiles.ALARM5;
var content = IcsFiles.Alarm5;
TestAlarm(content, dateTimes, new CalDateTime(1997, 7, 1, _tzid), new CalDateTime(2000, 12, 31, _tzid));
}

Expand All @@ -141,7 +141,7 @@ public void Alarm6()
new CalDateTime(1998, 1, 17, 8, 0, 0, _tzid)
});

var content = IcsFiles.ALARM6;
var content = IcsFiles.Alarm6;
TestAlarm(content, dateTimes, new CalDateTime(1997, 7, 1, _tzid), new CalDateTime(2000, 12, 31, _tzid));
}

Expand All @@ -163,7 +163,7 @@ public void Alarm7()
new CalDateTime(2006, 8, 5, 10, 30, 0, _tzid)
});

var content = IcsFiles.ALARM7;
var content = IcsFiles.Alarm7;
TestAlarm(content, dateTimes, new CalDateTime(2006, 7, 1, _tzid), new CalDateTime(2006, 9, 1, _tzid));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ public static IEnumerable<ITestCaseData> Attendees_TestCases()
[Test, TestCaseSource(nameof(CalendarCollection_TestCases))]
public void CalendarCollection_Tests(string rawCalendar)
{
var a = Calendar.Load(IcsFiles.USHolidays);
var b = Calendar.Load(IcsFiles.USHolidays);
var a = Calendar.Load(IcsFiles.UsHolidays);
var b = Calendar.Load(IcsFiles.UsHolidays);

Assert.IsNotNull(a);
Assert.IsNotNull(b);
Expand All @@ -222,7 +222,7 @@ public static IEnumerable<ITestCaseData> CalendarCollection_TestCases()
{
yield return new TestCaseData(IcsFiles.Google1).SetName("Google calendar test case");
yield return new TestCaseData(IcsFiles.Parse1).SetName("Weird file parse test case");
yield return new TestCaseData(IcsFiles.USHolidays).SetName("US Holidays (quite large)");
yield return new TestCaseData(IcsFiles.UsHolidays).SetName("US Holidays (quite large)");
}

[Test]
Expand Down
25 changes: 12 additions & 13 deletions net-core/Ical.Net/Ical.Net.UnitTests/IcsFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ internal static string ReadStream(string manifestResource)
}

internal static string Alarm1 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM1.ics");
internal static string ALARM1 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM1.ics");
internal static string ALARM2 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM2.ics");
internal static string ALARM3 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM3.ics");
internal static string ALARM4 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM4.ics");
internal static string ALARM5 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM5.ics");
internal static string ALARM6 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM6.ics");
internal static string ALARM7 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM7.ics");
internal static string Alarm2 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM2.ics");
internal static string Alarm3 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM3.ics");
internal static string Alarm4 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM4.ics");
internal static string Alarm5 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM5.ics");
internal static string Alarm6 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM6.ics");
internal static string Alarm7 => ReadStream("Ical.Net.UnitTests.Calendars.Alarm.ALARM7.ics");
internal static string Attachment3 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Attachment3.ics");
internal static string Attachment4 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Attachment4.ics");
internal static string Attendee1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Attendee1.ics");
Expand Down Expand Up @@ -75,8 +74,8 @@ internal static string ReadStream(string manifestResource)
internal static string HourlyInterval1 => ReadStream("Ical.Net.UnitTests.Calendars.Recurrence.HourlyInterval1.ics");
internal static string HourlyInterval2 => ReadStream("Ical.Net.UnitTests.Calendars.Recurrence.HourlyInterval2.ics");
internal static string HourlyUntil1 => ReadStream("Ical.Net.UnitTests.Calendars.Recurrence.HourlyUntil1.ics");
internal static string JOURNAL1 => ReadStream("Ical.Net.UnitTests.Calendars.Journal.JOURNAL1.ics");
internal static string JOURNAL2 => ReadStream("Ical.Net.UnitTests.Calendars.Journal.JOURNAL2.ics");
internal static string Journal1 => ReadStream("Ical.Net.UnitTests.Calendars.Journal.JOURNAL1.ics");
internal static string Journal2 => ReadStream("Ical.Net.UnitTests.Calendars.Journal.JOURNAL2.ics");
internal static string Language1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Language1.ics");
internal static string Language2 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Language2.ics");
internal static string Language3 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Language3.ics");
Expand Down Expand Up @@ -106,9 +105,9 @@ internal static string ReadStream(string manifestResource)
internal static string Parameter1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Parameter1.ics");
internal static string Parameter2 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Parameter2.ics");
internal static string Parse1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Parse1.ics");
internal static string PARSE17 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.PARSE17.ics");
internal static string ProdID1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.ProdID1.ics");
internal static string ProdID2 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.ProdID2.ics");
internal static string Parse17 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.PARSE17.ics");
internal static string ProdId1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.ProdID1.ics");
internal static string ProdId2 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.ProdID2.ics");
internal static string Property1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Property1.ics");
internal static string RecurrenceDates1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.RecurrenceDates1.ics");
internal static string RequestStatus1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.RequestStatus1.ics");
Expand All @@ -128,7 +127,7 @@ internal static string ReadStream(string manifestResource)
internal static string Transparency1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Transparency1.ics");
internal static string Transparency2 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Transparency2.ics");
internal static string Trigger1 => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.Trigger1.ics");
internal static string USHolidays => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.USHolidays.ics");
internal static string UsHolidays => ReadStream("Ical.Net.UnitTests.Calendars.Serialization.USHolidays.ics");
internal static string WeeklyCount1 => ReadStream("Ical.Net.UnitTests.Calendars.Recurrence.WeeklyCount1.ics");
internal static string WeeklyCountWkst1 => ReadStream("Ical.Net.UnitTests.Calendars.Recurrence.WeeklyCountWkst1.ics");
internal static string WeeklyCountWkst2 => ReadStream("Ical.Net.UnitTests.Calendars.Recurrence.WeeklyCountWkst2.ics");
Expand Down
4 changes: 2 additions & 2 deletions net-core/Ical.Net/Ical.Net.UnitTests/JournalTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class JournalTest
[Test, Category("Journal")]
public void Journal1()
{
var iCal = Calendar.Load(IcsFiles.JOURNAL1);
var iCal = Calendar.Load(IcsFiles.Journal1);
ProgramTest.TestCal(iCal);
Assert.AreEqual(1, iCal.Journals.Count);
var j = iCal.Journals[0];
Expand All @@ -24,7 +24,7 @@ public void Journal1()
[Test, Category("Journal")]
public void Journal2()
{
var iCal = Calendar.Load(IcsFiles.JOURNAL2);
var iCal = Calendar.Load(IcsFiles.Journal2);
ProgramTest.TestCal(iCal);
Assert.AreEqual(1, iCal.Journals.Count);
var j = iCal.Journals.First();
Expand Down
2 changes: 1 addition & 1 deletion net-core/Ical.Net/Ical.Net.UnitTests/ProgramTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void LoadAndDisplayCalendar()
{
// The following code loads and displays an iCalendar
// with US Holidays for 2006.
var iCal = Calendar.Load(IcsFiles.USHolidays);
var iCal = Calendar.Load(IcsFiles.UsHolidays);
Assert.IsNotNull(iCal, "iCalendar did not load.");
}

Expand Down
2 changes: 1 addition & 1 deletion net-core/Ical.Net/Ical.Net.UnitTests/RecurrenceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2627,7 +2627,7 @@ public void Bug3292737()
[Test, Category("Recurrence")]
public void UsHolidays()
{
var iCal = Calendar.Load(IcsFiles.USHolidays);
var iCal = Calendar.Load(IcsFiles.UsHolidays);
Assert.IsNotNull(iCal, "iCalendar was not loaded.");
var items = new Dictionary<string, CalDateTime>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Linq;
using Ical.Net.DataTypes;
using Ical.Net.Utility;
using Period = Ical.Net.DataTypes.Period;

namespace Ical.Net.Evaluation
{
Expand Down

0 comments on commit c5c1b6c

Please sign in to comment.