Skip to content

Commit

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

We've fixed unit test failures.

---

Type: fix
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Mar 29, 2024
1 parent 380d387 commit 802b830
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions VisualCard.Tests/ContactParseTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ public void ParseDifferentMeCardContactsAndTestEquality(string cardText)
Card[] secondCards = [];

// Parse the cards
Should.NotThrow(() => cards = CardTools.GetCardsFromString(cardText));
Should.NotThrow(() => secondCards = CardTools.GetCardsFromString(cardText));
Should.NotThrow(() => cards = MeCard.GetContactsFromMeCardString(cardText));
Should.NotThrow(() => secondCards = MeCard.GetContactsFromMeCardString(cardText));

// Test equality with available data
List<bool> foundCards = [];
Expand All @@ -208,8 +208,8 @@ public void ParseDifferentMeCardContactsSaveToStringAndTestEquality(string cardT
Card[] secondCards = [];

// Parse the cards
Should.NotThrow(() => cards = CardTools.GetCardsFromString(cardText));
Should.NotThrow(() => secondCards = CardTools.GetCardsFromString(cardText));
Should.NotThrow(() => cards = MeCard.GetContactsFromMeCardString(cardText));
Should.NotThrow(() => secondCards = MeCard.GetContactsFromMeCardString(cardText));

// Save all the cards to strings and re-parse
foreach (Card card in cards)
Expand Down
2 changes: 1 addition & 1 deletion VisualCard/Converters/MeCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public static Card[] GetContactsFromMeCardString(string meCardString)
values[i] = value.Replace(",", ";");

// Build a full name
if (value.StartsWith($"{VcardConstants._nameSpecifier}N:"))
if (value.StartsWith($"{VcardConstants._nameSpecifier}:"))
{
var nameSplits = value.Substring(2).Split(',');
fullName = $"{nameSplits[1]} {nameSplits[0]}";
Expand Down

0 comments on commit 802b830

Please sign in to comment.