Skip to content

Commit

Permalink
Fix AddName and AddPhone.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoergHoffmannatGitHub committed Jan 5, 2023
1 parent ccecf73 commit 23de680
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions Gedcomx.Model.Test/AgentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ private static void VerifyXmlSerialization(Agent sut)
Assert.That(result, Does.Contain("xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""));
Assert.That(result, Does.Contain("xmlns=\"http://gedcomx.org/v1/\""));
Assert.That(result.Contains("id"), Is.EqualTo(sut.Id != null));
Assert.That(result.Contains("account"), Is.EqualTo(sut.ShouldSerializeAccounts()));
Assert.That(result.Contains("address"), Is.EqualTo(sut.ShouldSerializeAddresses()));
Assert.That(result.Contains("email"), Is.EqualTo(sut.ShouldSerializeEmails()));
Assert.That(result.Contains("homepage"), Is.EqualTo(sut.Homepage != null));
Assert.That(result.Contains("identifier"), Is.EqualTo(sut.ShouldSerializeIdentifiers()));
Assert.That(result.Contains("name"), Is.EqualTo(sut.ShouldSerializeNames()));
Assert.That(result.Contains("openid"), Is.EqualTo(sut.Openid != null));
Assert.That(result.Contains("phone"), Is.EqualTo(sut.ShouldSerializePhones()));
Assert.That(result.Contains("<account "), Is.EqualTo(sut.ShouldSerializeAccounts()));
Assert.That(result.Contains("<address "), Is.EqualTo(sut.ShouldSerializeAddresses()));
Assert.That(result.Contains("<email "), Is.EqualTo(sut.ShouldSerializeEmails()));
Assert.That(result.Contains("<homepage"), Is.EqualTo(sut.Homepage != null));
Assert.That(result.Contains("<identifier "), Is.EqualTo(sut.ShouldSerializeIdentifiers()));
Assert.That(result.Contains("<name "), Is.EqualTo(sut.ShouldSerializeNames()));
Assert.That(result.Contains("<openid"), Is.EqualTo(sut.Openid != null));
Assert.That(result.Contains("<phone "), Is.EqualTo(sut.ShouldSerializePhones()));
}

private static void VerifyJsonSerialization(Agent sut)
Expand Down
4 changes: 2 additions & 2 deletions Gedcomx.Model/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public Agent SetAddress(Address address)
*/
public void AddName(TextValue name)
{
this._names.Add(name);
this.Names.Add(name);
}

/**
Expand Down Expand Up @@ -356,7 +356,7 @@ public void AddEmail(ResourceReference email)
*/
public void AddPhone(ResourceReference phone)
{
this._phones.Add(phone);
this.Phones.Add(phone);
}

/**
Expand Down

0 comments on commit 23de680

Please sign in to comment.