public static EntityWithListType GetRandomInstance(int seed = 1) { EntityWithListType entity = new EntityWithListType(); entity.Id = Guid.NewGuid().ToString(); entity.ListType = new List<int>() { seed }; return entity; }
public EntityWithListType Clone() { EntityWithListType entity = new EntityWithListType(); entity.Id = Id; entity.ListType = new List<int>(); entity.ListType.AddRange(ListType); return entity; }
public static Tuple <Table <EntityWithListType>, List <EntityWithListType> > SetupDefaultTable( ISession session) { // create table var config = new MappingConfiguration().Define( new Map <EntityWithListType>() .TableName("EntityWithListType_" + Randomm.RandomAlphaNum(12)) .PartitionKey(u => u.Id)); var table = new Table <EntityWithListType>(session, config); table.Create(); var entityList = EntityWithListType.GetDefaultEntityList(); //Insert some data foreach (var singleEntity in entityList) { table.Insert(singleEntity).Execute(); } return(new Tuple <Table <EntityWithListType>, List <EntityWithListType> >(table, entityList)); }
public void AssertEquals(EntityWithListType actualEntity) { Assert.AreEqual(Id, actualEntity.Id); CollectionAssert.AreEquivalent(ListType, actualEntity.ListType); }
public void AssertEquals(EntityWithListType actualEntity) { Assert.AreEqual(Id, actualEntity.Id); Assert.AreEqual(ListType, actualEntity.ListType); }