public void LoginTryTest() { ILoginService service = new ApplicationLoginService(); service.TryToLoginAsync("pavel", "123"); Assert.False(service.TryToLoginAsync("pavel", "12").Result, "Login must be failed."); Assert.True(service.TryToLoginAsync("pavel", "123").Result); }
public void Setup() { this.moqer = new AutoMoq.AutoMoqer(); this.sut = this.moqer.Resolve <ApplicationLoginService>(); this.mockSessionProvider = this.moqer.GetMock <ISessionProvider>(); this.mockRssSubscriptionRepository = this.moqer.GetMock <IRssChannelsSubscriptionsRepository>(); this.mockMapper = this.moqer.GetMock <IMapper>(); this.mockChannelRepository = this.moqer.GetMock <IRssChannelsRepository>(); this.mockAuthentication = this.moqer.GetMock <IUserAuthentication>(); this.mockSocialLoginRepository = this.moqer.GetMock <ISocialLoginRepository>(); this.mockUserRepository = this.moqer.GetMock <IUserRepository>(); }