public void test()
        {
            DatabaseSumIndbetaling databaseSumIndbetaling = CreateDatabaseSumIndbetaling();

            SumIndbetaling sumIndbetaling = new SumIndbetaling(Connection, databaseSumIndbetaling);

            sumIndbetaling.ExecuteOption(new Administration.Option.Options.OptionReport(typeof(SumIndbetalingTest)));
        }
        public static SumIndbetaling Create(MongoConnection mongoConnection, string urlLoginName, string name, Schedule schedule)
        {
            SumIndbetaling sumIndbetaling = new SumIndbetaling()
            {
                urlLoginName = urlLoginName,
            };

            Create(mongoConnection, sumIndbetaling, name, schedule);

            return(sumIndbetaling);
        }
Exemple #3
0
        public void AssignWorkerAssignsWorkerToAll()
        {
            SumIndbetaling option1 = SumIndbetaling.Create(_mongoConnection, "test", "test", CreateSchedule());
            SumIndbetaling option2 = SumIndbetaling.Create(_mongoConnection, "test", "test", CreateSchedule());
            SumIndbetaling option3 = SumIndbetaling.Create(_mongoConnection, "test", "test", CreateSchedule());

            Worker worker = new Worker();

            worker.Create(_mongoConnection);

            OptionBase.AssignWorkerToAllUnassigned <SumIndbetaling>(worker, _mongoConnection);

            List <SumIndbetaling> optionsRead = OptionBase.ReadAllowed <SumIndbetaling>(_mongoConnection, null);

            Assert.IsTrue(optionsRead.All(option => option.Schedule.WorkerId == worker._id));
        }