public IDataEntity BuildLargeEmployer(LargeEmployers largeEmployers) { return(new DataEntity(Attributes.EntityLargeEmployerReferenceData) { Attributes = new Dictionary <string, IAttributeData>() { { Attributes.LargeEmpEffectiveFrom, new AttributeData(largeEmployers.EffectiveFrom) }, { Attributes.LargeEmpEffectiveTo, new AttributeData(largeEmployers.EffectiveTo) } } }); }
public void BuildLargeEmployer() { var largeEmployer = new LargeEmployers { ERN = 100, EffectiveFrom = new DateTime(2018, 1, 1), EffectiveTo = null, }; var dataEntity = NewService().BuildLargeEmployer(largeEmployer); dataEntity.EntityName.Should().Be("LargeEmployerReferenceData"); dataEntity.Attributes.Should().HaveCount(2); dataEntity.Attributes["LargeEmpEffectiveFrom"].Value.Should().Be(largeEmployer.EffectiveFrom); dataEntity.Attributes["LargeEmpEffectiveTo"].Value.Should().Be(largeEmployer.EffectiveTo); dataEntity.Children.Should().BeNullOrEmpty(); }