protected NavigationManagerBase([NotNull] object frameControl, IViewInteractionStrategy viewInteractionStrategy, [NotNull] IDataStorage dataStorage) { _frameControl = frameControl ?? throw new ArgumentNullException(nameof(frameControl)); _viewInteractionStrategy = viewInteractionStrategy ?? throw new ArgumentNullException(nameof(viewInteractionStrategy)); _dataStorage = dataStorage ?? throw new ArgumentNullException(nameof(dataStorage)); }
public void ViewInteractionStrategyIsNull_ThrowException() { //Arrange object frameControl = new object(); IViewInteractionStrategy viewInteractionStrategy = null; //Act void Action() { var navigationManagerBase = new Mock <NavigationManagerBase>(MockBehavior.Strict, frameControl, viewInteractionStrategy).Object; } //Assert Assert.That(Action, ThrowsException.InnerException.NullArgument(ArgumentNames.ViewInteractionStrategy)); }
protected NavigationManagerBase([NotNull] object frameControl, IViewInteractionStrategy viewInteractionStrategy) : this(frameControl, viewInteractionStrategy, new DataStorage()) { }