Hi..
I have this kind of test situation I need Guid list to be send with ReturnsCollection
[TestMethod]
public void GetCodedObjectsClients_WithServiceArea()
{
// Arrange
KAPRole role = CreateDataRole();
//Create test worker
OHPClientWorker clientWorker = new OHPClientWorker(Entities);
Guid MyGuidi = new Guid("ccae2079-2ebc-4200-879d-866fc82e6afa");
Guid MyGuidi2 = new Guid("ccae2079-3ebc-4200-879d-866fc82e6afa");
IEnumerable<Guid> guids = new List<Guid> { MyGuidi, MyGuidi2 };
// Create mock data
Mock.Arrange(() => clientWorker.ServiceAreaWorker.GetServiceAreaUserGuids(Arg.IsAny<long>())).ReturnsCollection(guids);
But in code to test the Guid list contains only guids 00000 0000 00000 00000 .... So guid was changed from ccae2079-2ebc-4200-879d-866fc82e6afa" to 00000 0000 00000 0000 Why
public ICollection<OHPClientWithCodedObject> GetCodedObjectsClients(ICollection<long> objectIDs, ICollection<KAPRole> roles, long serviceAreaID)
{
//Users with rights granted through servicearea
ICollection<Guid> userGuids = ServiceAreaWorker.GetServiceAreaUserGuids(serviceAreaID);
............
userGuids does not contain anymore real Guids
Any Idea why ReturnsCollection chages Guids
I have this kind of test situation I need Guid list to be send with ReturnsCollection
[TestMethod]
public void GetCodedObjectsClients_WithServiceArea()
{
// Arrange
KAPRole role = CreateDataRole();
//Create test worker
OHPClientWorker clientWorker = new OHPClientWorker(Entities);
Guid MyGuidi = new Guid("ccae2079-2ebc-4200-879d-866fc82e6afa");
Guid MyGuidi2 = new Guid("ccae2079-3ebc-4200-879d-866fc82e6afa");
IEnumerable<Guid> guids = new List<Guid> { MyGuidi, MyGuidi2 };
// Create mock data
Mock.Arrange(() => clientWorker.ServiceAreaWorker.GetServiceAreaUserGuids(Arg.IsAny<long>())).ReturnsCollection(guids);
But in code to test the Guid list contains only guids 00000 0000 00000 00000 .... So guid was changed from ccae2079-2ebc-4200-879d-866fc82e6afa" to 00000 0000 00000 0000 Why
public ICollection<OHPClientWithCodedObject> GetCodedObjectsClients(ICollection<long> objectIDs, ICollection<KAPRole> roles, long serviceAreaID)
{
//Users with rights granted through servicearea
ICollection<Guid> userGuids = ServiceAreaWorker.GetServiceAreaUserGuids(serviceAreaID);
............
userGuids does not contain anymore real Guids
Any Idea why ReturnsCollection chages Guids