Esempio n. 1
0
        public void SetUp()
        {
            _mockery        = new MockRepository();
            _instancePlugin = _mockery.DynamicMock <ILogger>();

            ThreadContext.Create("Easy.Tests");
            ThreadContext.GetCurrent().SetInstance(new Logger(_instancePlugin));
        }
Esempio n. 2
0
        public void Setup()
        {
            _mockery        = new MockRepository();
            _instancePlugin = _mockery.DynamicMock <IContainer>();

            ThreadContext.Create("Easy.Tests");
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.IoC.Container(_instancePlugin));
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.Log.Logger(MockRepository.GenerateStub <ILogger>()));
        }
        public void Setup()
        {
            _mockery        = new MockRepository();
            _instancePlugin = _mockery.DynamicMock <ITranslator>();

            ThreadContext.Create("EasyArchitecture.Tests");
            ThreadContext.GetCurrent().SetInstance(new Translator(_instancePlugin));
            ThreadContext.GetCurrent().SetInstance(new EasyArchitecture.Instances.Log.Logger(MockRepository.GenerateStub <ILogger>()));
        }
        public void SetUp()
        {
            _mockery     = new MockRepository();
            _cachePlugin = _mockery.DynamicMock <ICache>();

            _key = Guid.NewGuid().ToString();

            ThreadContext.Create("Easy.Tests");
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.Log.Logger(MockRepository.GenerateStub <ILogger>()));
        }
Esempio n. 5
0
        public void SetUp()
        {
            _mockery        = new MockRepository();
            _instancePlugin = _mockery.DynamicMock <IStorage>();

            ThreadContext.Create("EasyArchitecture.Tests");
            ThreadContext.GetCurrent().SetInstance(new Storer(_instancePlugin));
            ThreadContext.GetCurrent().SetInstance(new EasyArchitecture.Instances.Log.Logger(MockRepository.GenerateStub <ILogger>()));

            _buffer = new byte[10];
        }
Esempio n. 6
0
        public void SetUp()
        {
            _mockery        = new MockRepository();
            _instancePlugin = _mockery.DynamicMock <IPersistence>();

            ThreadContext.Create("Easy.Tests");
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.Persistence.Persistence(_instancePlugin));
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.Log.Logger(MockRepository.GenerateStub <ILogger>()));

            _dog = new Dog {
                Age = 15, Name = "Old Dog"
            };
        }
Esempio n. 7
0
        public void SetUp()
        {
            _mockery        = new MockRepository();
            _instancePlugin = _mockery.DynamicMock <IValidator>();

            ThreadContext.Create("Easy.Tests");
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.Validation.Validator(_instancePlugin));
            ThreadContext.GetCurrent().SetInstance(new Easy.Instances.Log.Logger(MockRepository.GenerateStub <ILogger>()));

            _oldDog = new Dog {
                Age = 15, Name = "Old Dog"
            };
            _youngDog = new Dog {
                Age = 5, Name = "Young Dog"
            };
        }
Esempio n. 8
0
 public void ActivateCurrentThread()
 {
     ThreadContext.Create(_moduleName);
 }