public void GenerateLinksTest() { var mock = fixture.Freeze <Mock <ILinkShortener> >(); sut = fixture.Create <SimpleEngine>(); sut.GenerateLinks(); mock.Verify(s => s.ShortenAllLinks(It.IsAny <List <Episode> >()), Times.Once); }
public void LoadData_GenerateInteractionTest() { var testdata = fixture.Create <List <Episode> >(); var mockLoadData = fixture.Freeze <Mock <ILoadData> >(); mockLoadData.Setup(ld => ld.Execute()).Returns(testdata); var mockShortener = fixture.Freeze <Mock <ILinkShortener> >(); sut = fixture.Create <SimpleEngine>(); sut.LoadData(); sut.GenerateLinks(); mockShortener.Verify(s => s.ShortenAllLinks(testdata), Times.Once); }