Skip to content

Commit

Permalink
fix - Fixed false test failures
Browse files Browse the repository at this point in the history
---

We've fixed test failures caused by specifying the wrong elements.

---

Type: fix
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 10, 2025
1 parent 4f818cc commit c19d313
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions private/VisualCard.Tests/Calendars/CalendarPropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,27 @@ public void TestCalendarPropertyRemoveStringInEvent()
var calendar = calendars[0];
var eventChunk = calendar.Events[0];
var status = eventChunk.GetString(CalendarStringsEnum.Status)[0];
status.Value.ShouldBe("GREGORIAN");
status.Value.ShouldBe("CONFIRMED");
eventChunk.DeleteString(CalendarStringsEnum.Status, 0);
eventChunk.GetString(CalendarStringsEnum.Status).ShouldBeEmpty();
string calendarStr = calendar.SaveToString();
calendarStr.ShouldNotContain("GREGORIAN");
calendarStr.ShouldNotContain("CONFIRMED");
}

[TestMethod]
public void TestCalendarPropertyRemovePartsArrayInEvent()
{
var calendars = CalendarTools.GetCalendarsFromString(CalendarData.singleVCalendarTwoCalendar);
var calendar = calendars[0];
var status = calendar.GetPartsArray<RequestStatusInfo>()[0];
var eventChunk = calendar.Events[0];
var status = eventChunk.GetPartsArray<RequestStatusInfo>()[0];
status.RequestStatus.ShouldBe((4, 1, 0));
calendar.DeletePartsArray<RequestStatusInfo>(0);
calendar.GetPartsArray<RequestStatusInfo>().Length.ShouldBe(1);
status = calendar.GetPartsArray<RequestStatusInfo>()[0];
eventChunk.DeletePartsArray<RequestStatusInfo>(0);
eventChunk.GetPartsArray<RequestStatusInfo>().Length.ShouldBe(1);
status = eventChunk.GetPartsArray<RequestStatusInfo>()[0];
status.RequestStatus.ShouldBe((3, 7, 0));
calendar.DeletePartsArray<RequestStatusInfo>(0);
calendar.GetPartsArray<RequestStatusInfo>().ShouldBeEmpty();
eventChunk.DeletePartsArray<RequestStatusInfo>(0);
eventChunk.GetPartsArray<RequestStatusInfo>().ShouldBeEmpty();
string calendarStr = calendar.SaveToString();
calendarStr.ShouldNotContain("REQUEST-STATUS");
}
Expand Down

0 comments on commit c19d313

Please sign in to comment.