Beispiel #1
0
        public CatalogController(ICatalogControllerWorkerServices svc)
        {
            Contract.Requires <ArgumentNullException>(svc != null, "svc");
            Contract.Ensures(this.WorkerService == svc);

            this.WorkerService = svc;
        }
Beispiel #2
0
        public void CatalogController_Constructor_should_Throw_on_null_WorkerService()
        {
            ICatalogControllerWorkerServices svc = null;

            Executing.This(
                () => new CatalogController(svc)
                ).
            Should().
            Throw <ArgumentNullException>().
            And.
            ValueOf.
            ParamName.
            Should().
            Be("workerService");
        }
Beispiel #3
0
        public CatalogController(ICatalogControllerWorkerServices workerService)
        {
            Contract.Requires <ArgumentNullException>(workerService != null, "workerService");

            this.WorkerService = workerService;
        }