public OneToManyMapperConstraints()
 {
     _mapper = new OneToManyMapper();
     _mapper.Add(10, 100);
     _mapper.Add(10, 101);
     _mapper.Add(10, 102);
 }
 public OneToManyMapperTests()
 {
     _mapper = new OneToManyMapper();
     _mapper.Add(10, 100);
     _mapper.Add(10, 101);
     _mapper.Add(10, 102);
     _mapper.Add(20, 200);
     _mapper.Add(20, 201);
     _mapper.Add(30, 300);
     _mapper.Add(30, 301);
     _mapper.Add(40, 400);
     _mapper.Add(40, 401);
     _mapper.Add(40, 402);
 }
 public void ValidateAddConstraints(int parent, int child)
 {
     Assert.Throws <ArgumentException>(() => _mapper.Add(parent, child));
 }
Пример #4
0
 public void Add(int parent, int child)
 {
     _oneToManyMapper.Add(parent, child);
 }