public void ThatShapeUnitGroupRelationshipIsBiDirectional() { var unitGroup = UnitGroupServices.WithDto(GetUnitGroupDto()).Get(); var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get(); Assert.AreEqual(shape, unitGroup.Shapes.First()); }
public void ThatShapeIsAssociatedWithUnitGroup() { var unitGroup = UnitGroupServices.WithDto(GetUnitGroupDto()).Get(); var shape = ShapeServices.WithDto(ShapeTestFixtures.GetValidDtoWithUnitGroups()).Get(); Assert.AreEqual(shape.UnitGroupSet.Single(p => p.Name == unitGroup.Name), unitGroup); }