private static IOptions <SocialNetClientAppConfig> GetOptions() { var optionsMock = new Mock <IOptions <SocialNetClientAppConfig> >(); optionsMock.SetupGet(x => x.Value) .Returns(SocialNetClientAppConfigMock.Get(2)); return(optionsMock.Object); }
public void GetTwitterSocialNetClientTest() { var optionsMock = new Mock <IOptions <SocialNetClientAppConfig> >(); optionsMock.SetupGet(x => x.Value) .Returns(SocialNetClientAppConfigMock.Get(2)); var messageSeparatorServiceMock = new Mock <IMessageSeparatorService>(); var socialNetAuthorizationMock = new Mock <ISocialNetAuthorization>(); var socialNetClientFactory = new SocialNetClientFactory( optionsMock.Object, messageSeparatorServiceMock.Object, socialNetAuthorizationMock.Object); var result = socialNetClientFactory.GetTwitterSocialNetClient(); Assert.NotNull(result); }