Exemplo n.º 1
0
        public void TestMethod2()
        {
            //assumption: configuration file is stored in local drive c:
            GetEntity a    = new GetEntity("C:\\configuration.json", "U");
            var       list = a.EntityList(a.getData());

            Assert.IsNotNull(list, "No data found.");
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            GetEntity entity = new GetEntity("C:\\configuration.json", "U");
            var       list   = entity.EntityList(entity.getData());

            if (list != null)
            {
                foreach (var x in list)
                {
                    Console.WriteLine(x.Id.ToString() + ", " + x.Created + ", " + x.Type + ", " + x.Content);
                }
            }
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
Exemplo n.º 3
0
        public void TestMethod1()
        {
            List <Entity> ent = new List <Entity>();

            for (var x = 0; x < 5; x++)
            {
                var data = new Entity {
                    Id = x + 1, Created = DateTime.Now.AddMinutes(x + 1), Type = "U", Content = "test" + (x + 1).ToString()
                };
                ent.Add(data);
            }

            GetEntity a    = new GetEntity("", "U");
            var       list = a.EntityList(ent);

            Assert.IsNotNull(list, "No data found.");
        }