public void FunctionBase_WhenCommandNotFound_ShouldThrowException() { serviceProviderMock .Setup(x => x.GetService(It.IsAny <Type>())) .Returns(null); functionBase .Invoking(x => x.ResolveCommand <MockCommand>()) .Should().Throw <ApplicationException>(); }