public void AssertEquals(EntityWithAllCollectionTypes actualEntity) { Assert.AreEqual(Id, actualEntity.Id); Assert.AreEqual(ListType, actualEntity.ListType); Assert.AreEqual(ArrayType, actualEntity.ArrayType); Assert.AreEqual(DictionaryType, actualEntity.DictionaryType); }
public void AssertEquals(EntityWithAllCollectionTypes actualEntity) { Assert.AreEqual(Id, actualEntity.Id); Assert.AreEqual(ListType, actualEntity.ListType); Assert.AreEqual(ArrayType, actualEntity.ArrayType); Assert.AreEqual(DictionaryType, actualEntity.DictionaryType); }
public static EntityWithAllCollectionTypes GetRandomInstance(int seed = 1) { EntityWithAllCollectionTypes cte = new EntityWithAllCollectionTypes(); cte.Id = Guid.NewGuid().ToString(); cte.ListType = new List<int>() { seed }; cte.ArrayType = new string[] { seed.ToString() }; cte.DictionaryType = new Dictionary<string, string>() { {"key_" + seed, "val_" + seed} }; return cte; }
public EntityWithAllCollectionTypes Clone() { EntityWithAllCollectionTypes cte = new EntityWithAllCollectionTypes(); cte.Id = Id; cte.ListType = new List<int>(); cte.ListType.AddRange(ListType); cte.ArrayType = (string[])ArrayType.Clone(); cte.DictionaryType = new Dictionary<string, string>(); foreach (var fav in DictionaryType) cte.DictionaryType.Add(fav.Key, fav.Value); return cte; }
public static Tuple <Table <EntityWithAllCollectionTypes>, List <EntityWithAllCollectionTypes> > GetDefaultTable( ISession session, string tableName) { // create table var config = new MappingConfiguration().Define( new Map <EntityWithAllCollectionTypes>() .TableName(tableName) .PartitionKey(u => u.Id)); var table = new Table <EntityWithAllCollectionTypes>(session, config); var entityList = EntityWithAllCollectionTypes.GetDefaultAllDataTypesList(); return(new Tuple <Table <EntityWithAllCollectionTypes>, List <EntityWithAllCollectionTypes> >(table, entityList)); }
public EntityWithAllCollectionTypes Clone() { var cte = new EntityWithAllCollectionTypes(); cte.Id = Id; cte.ListType = new List <int>(); cte.ListType.AddRange(ListType); cte.ArrayType = (string[])ArrayType.Clone(); cte.DictionaryType = new Dictionary <string, string>(); foreach (var fav in DictionaryType) { cte.DictionaryType.Add(fav.Key, fav.Value); } return(cte); }
public static EntityWithAllCollectionTypes GetRandomInstance(int seed = 1) { var cte = new EntityWithAllCollectionTypes(); cte.Id = Guid.NewGuid().ToString(); cte.ListType = new List <int>() { seed }; cte.ArrayType = new string[] { seed.ToString() }; cte.DictionaryType = new Dictionary <string, string>() { { "key_" + seed, "val_" + seed } }; return(cte); }