I've got a problem with XML unit Testing.
Basically the problem is that there are 2 identical tags under same xpath, and I don't really know how exactly I should compare all of the children inside
...aperson...
.../aperson...
if there is another one identical, but with (different values inside)
Samples are made in list and my guess is i need to make both <aperson> </aperson>
from XML Document in to list as well, but I'm not too sure about it and don't really have an idea how to do it.
<Person>
<apersons>
<aperson>
<person_name></person_name>
<person_code></person_code>
<institut></institut>
<post></post>
<rep_type></rep_type>
<persreg></persreg
<state></state>
<address/>
</aperson>
<aperson>
<person_name></person_name>
<person_code></person_code>
<institut></institut>
<post></post>
<rep_type></rep_type>
<persreg></persreg>
<state></state>
<address/>
</aperson>
</apersons>
</person>
C#
c.Personas.Add(new Person
{
Name = "Elga",
Code = "-10317",
Institut = "Valde",
Post = "loceklis",
RepType = "1",
Perseg = "-07-03",
State = "LV"
});
// Person2
c.Personas.Add(new Person
{
Name = "Elga1",
Code = "-10317",
Institut = "Valde",
Post = "loceklis",
RepType = "1",
Perseg = "-07-03",
State = "LV"
});
CODE: pastebin