private IOPAService <ALBLearnerDto> MockTestObject() { var sessionFactory = new SessionFactory <ALBLearnerDto>(RulebaseProviderMock()); IOPADataEntityBuilder opaBuilder = new OPADataEntityBuilder(new DateTime(2020, 8, 1)); return(new OPAService <ALBLearnerDto>(sessionFactory, new SessionBuilder(), opaBuilder)); }
private IDataEntity SetupMapToOpDataEntity() { var mapToDataEntity = new OPADataEntityBuilder(new DateTime(2017, 8, 1)); EntityInstance entityInstance = TestEntityInstance(); return(mapToDataEntity.MapOpaToEntity(entityInstance, null)); }
private IDataEntity GetOutputEntity() { IOPADataEntityBuilder createDataEntity = new OPADataEntityBuilder(new DateTime(2017, 8, 1)); EntityInstance entityInstance = TestEntityInstance(); return(createDataEntity.CreateOPADataEntity(entityInstance, null)); }
private IDataEntity SetupMapAttributes() { var mapAttributes = new OPADataEntityBuilder(new DateTime(2017, 8, 1)); EntityInstance entityInstance = TestEntityInstance(); IDataEntity dataEntity = new DataEntity(entityInstance.GetEntity().GetName()); mapAttributes.MapAttributes(entityInstance, dataEntity); return(dataEntity); }
private IDataEntity SetupMapEntities() { var mapEntities = new OPADataEntityBuilder(new DateTime(2017, 8, 1)); var instance = TestEntityInstance(); var childEntities = instance.GetEntity().GetChildEntities(); var dataEntity = new DataEntity(instance.GetEntity().GetName()); mapEntities.MapEntities(instance, childEntities, dataEntity); return(dataEntity); }
private IDictionary <string, IAttributeData> SetupMapOpaAttribute() { var builder = new OPADataEntityBuilder(new DateTime(2017, 8, 1)); var instance = TestEntityInstance(); IDictionary <string, IAttributeData> attributeDictionary = new Dictionary <string, IAttributeData>(); var rbAttributes = instance.GetEntity().GetAttributes(); foreach (RBAttr attribute in rbAttributes) { var attData = builder.MapOpaAttributeToDataEntity(instance, attribute); attributeDictionary.Add(attribute.GetName(), attData); } return(attributeDictionary); }