public void SetUp()
 {
     _model = Substitute.For<ILoginModel>();
     _messageService = Substitute.For<IMessageBoxService>();
     _wos = Substitute.For<IWindowOpeningService>();
     _uut = new LoginViewModel(_model, _messageService, _wos);
 }
예제 #2
0
        public void SetUp()
        {
            //Setup mocks
            _collector = Substitute.For<IUserCollector>();
            _messageService = Substitute.For<IMessageBoxService>();
            _wos = Substitute.For<IWindowOpeningService>();

            //Setup reals
            _model = new LoginModel(_collector);
            _sut = new LoginViewModel(_model, _messageService, _wos);
        }
 public void Constructor_WindowOpeningServiceIsNull_ThrowsArgumentNullException()
 {
     Assert.Throws<ArgumentNullException>(() => _uut = new LoginViewModel(_model, _messageService, null));
 }
 public void Constructor_MessageServiceIsNull_ThrowsArgumentNullException()
 {
     Assert.Throws<ArgumentNullException>(() => _uut = new LoginViewModel(_model, null, _wos));
 }