public void CreateTextBL_WithParameters_Ok() { ITextDataAccess textDataAccess = new TextDataAccess(); IBodyDataAccess bodyDataAccess = new BodyDataAccess(); ITextBusinessLogic textBL = new TextBusinessLogic(textDataAccess); Assert.IsNotNull(textBL); }
public void IntegrationTest_ExpectedParameters_Ok() { TextDataAccess textDA = new TextDataAccess(); BodyDataAccess bodyDA = new BodyDataAccess(); TextBusinessLogic textBL = new TextBusinessLogic(textDA); Text text1 = Utils.CreateTextForTest(); Text text2 = Utils.CreateTextForTest(); textBL.AddText(text1); textBL.AddText(text2); text2.OwnStyleClass = "Other style"; textBL.ModifyText(text2); textBL.DeleteText(text1.Id); Text text2Obtained = textBL.GetText(text2.Id); IList <Text> textsObtained = textBL.GetTexts(); Assert.IsTrue(!textsObtained.Contains(text1) && textsObtained.Contains(text2Obtained)); }