public SutInstanceCreator([NotNull] IArgumentNullExceptionFinder finder)
        {
            Guard.ArgumentNotNull(finder,
                                  nameof(finder));

            _finder = finder;
        }
 public void Initialize( )
 {
     _finder    = Substitute.For <IArgumentNullExceptionFinder> ( );
     _generator = Substitute.For <IArgumentsGenerator> ( );
     _typeClass = typeof(Something);
     _typeInt   = typeof(int);
     _instance  = new Something(new SomethingElse( ));
 }
        public void Constructor_ForFinderIsNull_Throws( )
        {
            _finder = null;

            Action action = () => { CreateSut( ); };

            action.Should( )
            .Throw <ArgumentNullException> ( )
            .WithParameter("finder");
        }
Пример #4
0
        public SutLazyInstanceCreator([NotNull] IArgumentNullExceptionFinder exceptionFinder,
                                      [NotNull] ICustomAttributeFinder attributeFinder)
        {
            Guard.ArgumentNotNull(exceptionFinder,
                                  nameof(exceptionFinder));
            Guard.ArgumentNotNull(attributeFinder,
                                  nameof(attributeFinder));

            _exceptionFinder = exceptionFinder;
            _attributeFinder = attributeFinder;
        }