public void AddDiscipline_Doesnt_Throw_Exception() { var rnd = new Random(DateTime.Now.Millisecond); int i = rnd.Next(_names.Length); var d = new Discipline { Index = $"ОУД{i:00}", Title = _names[i], MaxLoad = rnd.Next(20, 100), SelfGuided = rnd.Next(20, 100), StatutoryLoad = new StatutoryLoad { Total = rnd.Next(200, 500), LIZWithoutDivision = rnd.Next(10, 35), LIZWithDivision = rnd.Next(50, 60) } }; for (var j = 0; j < d.MidtermAssessment.Length; j++) { var index = rnd.Next(_assessement.Length); d.MidtermAssessment[j] = _assessement[index]; } for (var j = 0; j < d.WorkloadDistribution.Length; j++) { d.WorkloadDistribution[j] = rnd.Next(50); } try { _report.AddDiscipline(d); } catch (Exception e) { Assert.Fail(e.Message); } }