Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent using Properties got an NullReferenceException #48

Open
shadowca opened this issue Mar 8, 2017 · 0 comments
Open

Agent using Properties got an NullReferenceException #48

shadowca opened this issue Mar 8, 2017 · 0 comments

Comments

@shadowca
Copy link

shadowca commented Mar 8, 2017

Hi
i try to get the model under test for testing the serialization. So I use the Set - Methods like "SetAccount" and I use the Properties directly. It will caused an Exception.

var agent = new Agent();
agent.Accounts.Add(CreateOnlineAccount());
agent.Addresses.Add(CreateAddress());
agent.Emails.Add(CreateRessource());
agent.Homepage = CreateRessource();
agent.Identifiers.Add(CreateIdentifier());
agent.Names.Add(CreateTextValue());
agent.Openid = CreateRessource();
agent.Phones.Add(CreateRessource());
agent.Id = "id";
agent.Links.Add(CreateLink());

Why the error happened is clear to me, but why was it realized so? Can not you simply initialize the properties and remove the methods?

I have fixed the issue in #43 but if this have a deeper meaning I would be glad to learn it

JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 3, 2023
stoicflame added a commit that referenced this issue Jan 3, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 6, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 6, 2023
stoicflame added a commit that referenced this issue Jan 6, 2023
Further tests to fix #43 and #48 added. Work still in progress.
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 8, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 14, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 15, 2023
stoicflame added a commit that referenced this issue Jan 15, 2023
Add Tests to fix #43 and #48. Work in progress.
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 23, 2023
stoicflame added a commit that referenced this issue Jan 23, 2023
Add Test to fix #43 and #48. Work in Progress.
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 29, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 29, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 29, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 29, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 29, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Jan 29, 2023
stoicflame added a commit that referenced this issue Jan 29, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Feb 18, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Feb 18, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Feb 18, 2023
stoicflame added a commit that referenced this issue Feb 18, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 5, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 5, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 5, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 5, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 5, 2023
stoicflame added a commit that referenced this issue Mar 5, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 12, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 12, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 12, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 12, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 12, 2023
stoicflame added a commit that referenced this issue Mar 12, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 26, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Mar 26, 2023
stoicflame added a commit that referenced this issue Mar 26, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Apr 2, 2023
JoergHoffmannatGitHub added a commit to JoergHoffmannatGitHub/gedcomx-csharp that referenced this issue Apr 2, 2023
stoicflame added a commit that referenced this issue Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant