Example #1
0
        private static void GenerateIndividualScenario()
        {
            var setupAll = IndividualUserDataGenerator.Generate(2000, new DateTime(2015, 1, 1), new DateTime(2020, 8, 1));

            AddSpecialUsers(setupAll);
            File.WriteAllText("transactions.json", JsonConvert.SerializeObject(setupAll.TransactionsSetup));
            setupAll.TransactionsSetup = new TransactionsSetup();
            File.WriteAllText("setup.json", JsonConvert.SerializeObject(setupAll));

            var individualScenario = ScenarioGenerator.IndividualUserScenario(setupAll, 16, 6000, 2);

            for (int i = 0; i < individualScenario.Length; i++)
            {
                File.WriteAllText(i + "individual.json", individualScenario[i]);
            }
        }
Example #2
0
        private static void GenerateBusinessAndIndividualScenario()
        {
            var businessUsersSetup   = BusinessUserDataGenerator.Generate(500, new DateTime(2015, 1, 1), new DateTime(2020, 8, 1));
            var individualUsersSetup = IndividualUserDataGenerator.Generate(500, new DateTime(2015, 1, 1), new DateTime(2020, 8, 1));


            var transactionsSetup = businessUsersSetup.TransactionsSetup.Concat(individualUsersSetup.TransactionsSetup);

            businessUsersSetup.TransactionsSetup   = new TransactionsSetup();
            individualUsersSetup.TransactionsSetup = new TransactionsSetup();

            var setupAll = businessUsersSetup.Concat(individualUsersSetup);

            AddSpecialUsers(setupAll);

            File.WriteAllText("setup.json", JsonConvert.SerializeObject(setupAll));
            File.WriteAllText("transactions.json", JsonConvert.SerializeObject(transactionsSetup));

            var individualScenario = ScenarioGenerator.IndividualUserScenario(setupAll, 16, 2000, 2);

            for (int i = 0; i < individualScenario.Length; i++)
            {
                File.WriteAllText(i + "individual.json", individualScenario[i]);
            }

            var businessScenario = ScenarioGenerator.BusinessUserScenario(setupAll, 16, 2000, 3, 7, 2);

            for (int i = 0; i < businessScenario.Length; i++)
            {
                File.WriteAllText(i + "business.json", businessScenario[i]);
            }

            /*
             * var userActivityReportScenario = ScenarioGenerator.UserActivityReportsScenario(setupAll, 1, 5, new DateTime(2015, 1, 1), new DateTime(2020, 8, 1));
             * File.WriteAllText("userActivityReportScenario.json", userActivityReportScenario);
             *
             * var overallReportScenario = ScenarioGenerator.OverallReportScenario(10, 100, new DateTime(2015, 1, 1), new DateTime(2020, 8, 1));
             * File.WriteAllText("overallReportScenario.json", overallReportScenario);*/
        }