public void SetUp() { _mockery = new MockRepository(); _instancePlugin = _mockery.DynamicMock <ILogger>(); ThreadContext.Create("Easy.Tests"); ThreadContext.GetCurrent().SetInstance(new Logger(_instancePlugin)); }
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>())); }
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]; }
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" }; }
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" }; }
public void ActivateCurrentThread() { ThreadContext.Create(_moduleName); }