Esempio n. 1
0
        public static TestData <Entity> WithSingleEntityExpiration(this TestData <Entity> testdata, DateTime from, DateTime to, Action <TestData <Entity> > actions = null)
        {
            var spTestData = Default.Entity;

            actions?.Invoke(spTestData);

            var exp = new EntityExpiration
            {
                EntityGuid           = spTestData.Value.EntityGuid,
                Entity               = spTestData.Value,
                EntityExpirationGuid = Guid.NewGuid(),
                ValidFrom            = from,
                ValidTo              = to,
                IsActive             = true,
            };

            spTestData.Value.EntityExpirations.Add(exp);
            testdata.Value.EntityExpirations.Add(exp);

            return(testdata);
        }
 public MapPlaceEntityEntityExpiration(EntityPlace Place, EntityEntity Entity, EntityExpiration EntityExpiration)
 {
     Place            = Place;
     Entity           = Entity;
     EntityExpiration = EntityExpiration;
 }