public void ParseCourseType_CourseType_ShouldBeReturnValueCourseType(string courseType, CourseType expected) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); /* case "пр": * return CourseType.Practicte; * case "лр": * return CourseType.LaboratoryWork; * case "лб": * return CourseType.LaboratoryWork; * case "лек": * return CourseType.Lecture; * case "зач": * return CourseType.ControlCourse; * case "консультация": * return CourseType.СonsultationCourse; * case "экзамен": * return CourseType.ExamCourse; * case "лк": * return CourseType.Lecture; */ //Act var result = importDataExcelService.ParseCourseType(courseType); //Assert Assert.Equal(expected, result); }
public void ParseGroupName_StringGroupName_ShouldBeReturnParseGroup(string groupName, string expected) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); //Act var result = importDataExcelService.ParseGroupName(groupName); //Assert Assert.Equal(expected, result); }
public void PrepareCourseName_String_ShouldBeReturnStringWithoutNumbers(string stringValue, string expected) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); //Act var result = importDataExcelService.PrepareCourseName(stringValue); //Assert Assert.Equal(expected, result); }
public void IsNumberContains_Bool_ShouldBeReturnTrueOrFalse(string stringValue, bool expected) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); //Act var result = importDataExcelService.IsNumberContains(stringValue); //Assert Assert.Equal(expected, result); }
public void ParseParityWeek_BoolParity_ShouldBeReturnTrueOrFalse(string parity, bool expected) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); //Act var result = importDataExcelService.ParseParityWeek(parity); //Assert Assert.Equal(expected, result); }
public void ParseExcelFileForThreeGroup_EnumerableModels_ShouldParseExcelAndReturnModels() { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); var fileName = Path.Combine("TestFiles", "examScheduleFileTest.xls"); //Act var result = importDataExcelService.GetExamScheduleDatabaseModels(fileName).ToList(); //Assert Assert.True(result.Count > 0); }
public void GetExamScheduleDatabaseModels_CountDatabaseModels_ShouldParseExcelAndReturnCountModels() { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); var fileName = Path.Combine("TestFiles", "scheduleFileTest.xlsx"); //Act var result = importDataExcelService.GetCourseScheduleDatabaseModels(fileName).ToList(); //Assert Assert.True(result.Count > 0); }
public void ParseNumberWeek_ListInt_ShouldBeReturnListInt(string courseName, int flag) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); var expected = GetValueByFlag(flag); //Act var result = importDataExcelService.ParseNumberWeek(courseName); //Assert Assert.Equal(expected, result); }
public void PrepareDate_TupleWithNumberDateAndDayOfWeek_SplitInputStringAndReturnTuple( string input, string expectedNumberDate, string expectedDayOfWeek) { // Arrange var importDataExcelService = new ImportDataExcelService(_logger.Object); //Act var result = importDataExcelService.PrepareDate(input); //Assert Assert.Equal(expectedNumberDate, result.Item1); Assert.Equal(expectedDayOfWeek, result.Item2); }