Exemplo n.º 1
0
        public void Test_FillDatabase()
        {
            Random random = new Random();

            string[] args = new string[3];
            for (int i = 0; i < 3; i++)
            {
                string[] numbers = new string[176];
                for (int j = 0; j < numbers.Length; j++)
                {
                    numbers[j] = random.Next(1, 2).ToString();
                }
                args[i] = string.Join(",", numbers);
            }

            ImportService service = new ImportService();

            service.FillDatabase(args);

            using (MachineDbContext context = new MachineDbContext())
            {
                Assert.NotEmpty(context.Records);
            }
        }