public static void DeleteTestFromProgram(TestAssigningData data) { if (!TestsManager.IsTestExist(data.TestId)) { throw new Exception("Test doesn't exists!"); } if (Instance._testAssigningToPrograms.ContainsKey(data.ProgramId)) { Instance._testAssigningToPrograms[data.ProgramId].Remove(data); } }
public static void AssignTestToProgram(TestAssigningData data) { if (!TestsManager.IsTestExist(data.TestId)) { throw new Exception("Test doesn't exists!"); } if (!Instance._testAssigningToPrograms.ContainsKey(data.ProgramId)) { Instance._testAssigningToPrograms.Add(data.ProgramId, new List <TestAssigningData>()); } if (!Instance._testAssigningToPrograms[data.ProgramId].Contains(data)) { Instance._testAssigningToPrograms[data.ProgramId].Add(data); } }