public void GivenCourseAssociationToProgramTypeProductIsAlreadyCreatedIfNotThenCreateAssociation() { try { string productName = DatabaseTools.GetProduct(Enumerations.ProductInstance.HedCoreProgram); string isMasterCourseAlreadyAssociatedToProduct = DatabaseTools.GetProductMaterCourseAssociatedStatus(productName); if (isMasterCourseAlreadyAssociatedToProduct == null || isMasterCourseAlreadyAssociatedToProduct.Equals("False") || isMasterCourseAlreadyAssociatedToProduct.Equals("")) { GenericTestStep.StepToBrowsedUrlForPegasusUser("HED CS Admin"); GenericTestStep.StepToLoggedIntoTheCourseSpaceAsHedCSAdmin(); GenericTestStep.StepToItShouldShowTheManageProductsPage(); GenericTestStep.StepToSelectCourseInManageProductsPage("MySpanishLab Master Course"); GenericTestStep.StepToSelectTheProductInTheRightFrame("HedCoreProgram"); GenericTestStep.StepToAssociateTheCourseToProduct(); GenericTestStep.StepToItShouldDisplaySuccessfulMessage("Approved courses programmed successfully."); DatabaseTools.UpdateProductMaterCourseAssociatedStatus(productName); GenericTestStep.StepToIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication(); } } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); Assert.Fail(e.ToString()); } }