public virtual void TestSlotMapping() { IList expected = new ArrayList(); expected.Add(new IdMappingTestSuite.TestableIdSlotMapping(1, 10, 100)); expected.Add(new IdMappingTestSuite.TestableIdSlotMapping(4, 44, 400)); expected.Add(new IdMappingTestSuite.TestableIdSlotMapping(8, 800, 888)); for (IEnumerator testableIdSlotMappingIter = expected.GetEnumerator(); testableIdSlotMappingIter .MoveNext();) { IdMappingTestSuite.TestableIdSlotMapping testableIdSlotMapping = ((IdMappingTestSuite.TestableIdSlotMapping )testableIdSlotMappingIter.Current); _idMapping.MapId(testableIdSlotMapping._id, testableIdSlotMapping.Slot()); } IList actual = new ArrayList(); _idMapping.SlotChanges().Accept(new _IVisitor4_66(actual)); IteratorAssert.SameContent(expected, actual); }
public override bool Equals(object obj) { IdMappingTestSuite.TestableIdSlotMapping other = (IdMappingTestSuite.TestableIdSlotMapping )obj; return(_id == other._id && _address == other._address && _length == other._length); }