public void XSRC_XSRCEntity_Exists() { // ARRANGE // Use Test Helpers // ACT IXsrcEntity entity = TestXsrcEntity(); // ASSERT entity.Should().NotBeNull(); }
public void XSRC_XsrcEntity_Children() { // ARRANGE // Use Test Helpers // ACT IXsrcEntity entity = TestXsrcEntity(); // ASSERT entity.Children.Should().BeEquivalentTo(TestChildXsrcEntity()); }
public void XSRC_XsrcEntity_Attributes() { // ARRANGE // Use Test Helpers // ACT IXsrcEntity entity = TestXsrcEntity(); // ASSERT entity.Attributes.Should().BeEquivalentTo(TestXsrcAttributes()); }
public IList <string> GetEntityList(IXsrcEntity entity) { xsrcEntityList.Add(entity.PublicName); foreach (var child in entity.Children) { GetEntityList(child); } return(xsrcEntityList); }
public IDataEntity ConvertToDataEntity(IXsrcEntity xsrcEntity) { IDataEntity dataEntity = new DataEntity(xsrcEntity.PublicName) { Attributes = xsrcEntity .Attributes .GroupBy(a => a.PublicName) .ToDictionary(a => a.Key, b => new AttributeData(null) as IAttributeData), Children = GetChidren(xsrcEntity.Children) }; return(dataEntity); }
public IList <string> GetAttributeList(IXsrcEntity entity) { foreach (var attribute in entity.Attributes) { xsrcAttributeList.Add(attribute.PublicName); } foreach (var child in entity.Children) { GetAttributeList(child); } return(xsrcAttributeList); }