TestSetGetValue6() { // Add random keys and tags for each of N MockMetadataProvider objects. // Create an array of MockMetadataProvider objects and set random keys // and tags on them. const Int32 MockMetadataProviderObjects = 10000; MockMetadataProvider [] aoMockMetadataProvider = new MockMetadataProvider[MockMetadataProviderObjects]; for (Int32 i = 0; i < MockMetadataProviderObjects; i++) { MockMetadataProvider oMockMetadataProvider = aoMockMetadataProvider[i] = new MockMetadataProvider(); MetadataUtil.SetRandomMetadata( oMockMetadataProvider, true, true, i); } // Check the values, backwards. for (Int32 i = MockMetadataProviderObjects - 1; i >= 0; i--) { MetadataUtil.CheckRandomMetadata( aoMockMetadataProvider[i], true, true, i); } }
TestCopyTo8() { // Create N objects, set random metadata on each object, copy each // object's metadata to a new object, check metadata on new object. const Int32 Objects = 1976; MockMetadataProvider [] aoMockMetadataProvider = new MockMetadataProvider[Objects]; // Set random values on each object. for (Int32 i = 0; i < Objects; i++) { MockMetadataProvider oMockMetadataProvider = aoMockMetadataProvider[i] = new MockMetadataProvider(); MetadataUtil.SetRandomMetadata( oMockMetadataProvider, true, true, i); } for (Int32 i = 0; i < Objects; i++) { // Copy the object's metadata to a new object. MockMetadataProvider oMockMetadataProvider = aoMockMetadataProvider[i]; MockMetadataProvider oCopy = new MockMetadataProvider(); oMockMetadataProvider.CopyTo(oCopy, true, true); // Check the metadata on the new object. MetadataUtil.CheckRandomMetadata(oCopy, true, true, i); } }
SetUp() { m_oMetadataProvider = new MetadataProvider(); m_oCopy = new MockMetadataProvider(); }