public void GetEntitiesListTest() { var target = new NordeaRepository(); var actual = target.RetrieveEntities().ToList(); Assert.AreEqual(true, actual.Any()); var first = actual.First(); Assert.AreEqual(56.966957, first.Latitude); Assert.AreEqual(24.130421, first.Longitude); }
public void Export_Test() { var target = new NordeaRepository(); var list = target.RetrieveEntities().ToList(); foreach (var entity in list) { Console.WriteLine( @" INSERT INTO [dbo].[Entity] ([Id] ,[Title] ,[Address] ,[City] ,[Country] ,[Latitude] ,[Longitude] ,[Description] ,[Branch] ,[CashOut] ,[CashIn] ,[Chain] ,[Icon] ,[IconSmall] ,[IconMap]) VALUES ('" + entity.Id.ToString() + @"' ,N'" + entity.Title + @"' ,N'" + entity.Address + @"' ,N'" + entity.City + @"' ,N'" + entity.Country + @"' ," + entity.Latitude + @" ," + entity.Longitude + @" ,N'" + entity.Description + @"' ,'" + (entity.EntityType == EntityType.Branch ? "True" : "False") + @"' ,'" + ((entity.CashDirection & CashDirection.Out) == CashDirection.Out ? "True" : "False") + @"' ,'" + ((entity.CashDirection & CashDirection.In) == CashDirection.In ? "True" : "False") + @"' ,'" + entity.ChainCode + @"'"+ @" ,'https://public.sn2.livefilestore.com/y1p-Wv1vAZMCNlyhoibnxQLi2g7kvGXTb25yXpKErEIDsWKzG5RnRE4PvK9jERocb7v5ISWaZNu0M5z2JohJPX1pQ/nordea-details.png' ,'https://public.sn2.livefilestore.com/y1p-Wv1vAZMCNk3tK1EVByBKIbc-4eqbkI71NoEp4O06cx8gcNieR3FKCX3fru75ckfJhumG7YBGjiXbmuhr7Qneg/nordea-list.png' ,'https://public.sn2.livefilestore.com/y1pbEycgppU-exLvFV_kROKHR2qCZROYNBlV4gK2oVwznxVUt9HCL0Fj8Cuy6lYWK5HlbkWzQWeA1_zVzRHgxOpEg/nordea-map.png')"); } }