public SomeConcreteClassWithoutParameterlessConstructor(ISomeInterface someInterface) { if(someInterface == null) throw new ArgumentNullException("someInterface"); this._someInterface = someInterface; }
public Entity ReplaceISomeInterface(ISomeInterface newValue) { var component = CreateComponent<ISomeInterfaceComponent>(VisualDebuggingComponentIds.ISomeInterface); component.value = newValue; ReplaceComponent(VisualDebuggingComponentIds.ISomeInterface, component); return this; }
public void SetUp() { _stub = MockRepository.GenerateStub<ISomeInterface>(); _returnValue = LazyReturnValue.Create(1); _stub.Stub(x => x.Function()).LazyReturnValue(_returnValue); }
public ClassWithConstructorWithAllKindsOfParameters( ISomeInterface someInterface, SomeAbstractClass someAbstractClass, ClassWithDefaultConstructor1 class1, ClassWithDefaultConstructor1 class2, ClassWithConstructorParametersWhoseClassesHaveDefaultConstructor classWithParamsWithDefaultConstructors) { }
public void SetUp() { _mock1 = MockRepository.GenerateMock<ISomeInterface>(); _stub1 = MockRepository.GenerateStub<ISomeInterface>(); _mock2 = MockRepository.GenerateMock<ISomeOtherInterface>(); _signal1 = new Signal("signal description 1"); _signal2 = new Signal("signal description 2"); }
public SomeClass(ISomeInterface dependency) { if (dependency == null) { throw new ArgumentNullException("dependency"); } this.dependency = dependency; }
public Entity SetISomeInterface(ISomeInterface newValue) { if(hasISomeInterface) { throw new EntitasException("Could not set iSomeInterface!\n" + this + " already has an entity with ISomeInterfaceComponent!", "You should check if the context already has a iSomeInterfaceEntity before setting it or use context.ReplaceISomeInterface()."); } var entity = CreateEntity(); entity.AddISomeInterface(newValue); return entity; }
public Entity ReplaceISomeInterface(ISomeInterface newValue) { var entity = iSomeInterfaceEntity; if(entity == null) { entity = SetISomeInterface(newValue); } else { entity.ReplaceISomeInterface(newValue); } return entity; }
public ISomeInterface YetAnotherMethod(ISomeInterface s) { return s; }
public MultiInterfaceImplementation(ISomeInterface[] someInterfaces) { this.SomeInterfaces = someInterfaces; }
public A(ISomeInterface someInterface) { this.someInterface = someInterface; }
public MixedInjectedClassSingle(ISomeInterface someInterface) { this.someInterface = someInterface; }
public FileScopedNamespace(ISomeInterface someInterface) { this.someInterface = someInterface; }
public SomeDecoratingImplementation(ISomeInterface somethingToDecorate) { this.somethingToDecorate = somethingToDecorate; }
public TestClass(string param1, double param2, ISomeInterface param3) { Property1 = param1; Property2 = param2; Property3 = param3; }
public void AutoData_MixInType(ISomeInterface interfaceInstance) { Assert.NotNull(interfaceInstance); Assert.IsType <SomeClass>(interfaceInstance); }
public ISomeInterface YetAnotherMethod(ISomeInterface s) { return(s); }
public void SetUp() { _stub = MockRepository.GenerateStub<ISomeInterface>(); _stubValueProvider = MockRepository.GenerateStub<IValueProvider<int>>(); _stubValueProvider.Stub(x => x.Next()).Return(ExpectedReturnValue); }
public MyClass(ISomeInterface someInterface) { // Either use someInterface or store it in a private readonly field. }
public MixedInjectedClassMultiple(ISomeInterface someInterface, ISomeOtherInterface someOtherInterface) { this.someInterface = someInterface; this.someOtherInterface = someOtherInterface; }
public ClassForTestingWithInterface(ISomeInterface baseClass) {
public ConstructorInjectionHandler(ISomeInterface dependency) { Dependency = dependency; }
public SomeClassWithDependencies(ISomeInterface someInterface, ISomeOtherInterface someOtherInterface) { _someInterface = someInterface; _someOtherInterface = someOtherInterface; }
public CustomTextBox() { this.SomeInterface = new TextBoxSomeInterface(this); }
public void Set <T>(ISomeInterface <T> value) { Item <T> .Value = value; }
public ThreadSafe(ISomeInterface contained) { this.Contained = contained; }
public void TestInitialize() { this.subSomeInterface = Substitute.For <ISomeInterface>(); }
public ClassWithGenericInterfaceTests() { this.fakeGenericInterfaceBool = A.Fake <IGenericInterface <bool> >(); this.fakeGenericInterfaceListString = A.Fake <IGenericInterface <List <string> > >(); this.fakeSomeInterface = A.Fake <ISomeInterface>(); }
public OtherConcreteClass(ISomeInterface some) { Some = some; }
public void TestInitialize() { this.stubSomeInterface = MockRepository.GenerateStub <ISomeInterface>(); }
public void TestInitialize() { this.fakeSomeInterface = A.Fake <ISomeInterface>(); this.fakeSomeOtherInterface = A.Fake <ISomeOtherInterface>(); }
public void TestInitialize() { this.subInterface3 = Substitute.For <IInterface3>(); this.subSomeInterface = Substitute.For <ISomeInterface>(); this.subSomeOtherInterface = Substitute.For <ISomeOtherInterface>(); }
public ImportSomeInterface(ISomeInterface someInterface) { _someInterface = someInterface; }
public AnotherInterfaceImplementation(ISomeInterface someInterface) { this.SomeInterface = someInterface; }
public void TestInitialize() { this.mockInterface3 = Mock.Create <IInterface3>(); this.mockSomeInterface = Mock.Create <ISomeInterface>(); }
public ConstructorInjectedClassMultiple(ISomeInterface someInterface, ISomeOtherInterface someOtherInterface) { this.someInterface = someInterface; this.someOtherInterface = someOtherInterface; }
public void SetUp() { _mock = MockRepository.GenerateMock<ISomeInterface>(); }
public ClassWithMethods(ISomeInterface someInterface, ISomeOtherInterface someOtherInterface) { this.someInterface = someInterface; this.someOtherInterface = someOtherInterface; }
public SomeClass(ISomeInterface inter) { this.someInterface = inter; }
public Entity AddISomeInterface(ISomeInterface newValue) { var component = CreateComponent<ISomeInterfaceComponent>(VisualDebuggingComponentIds.ISomeInterface); component.value = newValue; return AddComponent(VisualDebuggingComponentIds.ISomeInterface, component); }
public void SetUp() { _mock1 = MockRepository.GenerateMock<ISomeInterface>(); _stub1 = MockRepository.GenerateStub<ISomeInterface>(); _mock2 = MockRepository.GenerateMock<ISomeOtherInterface>(); _signals = new SignalState(); }
public ObjectWithOptionalConstructorParameter([OptionalDependency] ISomeInterface someInterface) { this.someInterface = someInterface; }
public ObjectWithNamedOptionalConstructorParameter([OptionalDependency("named")] ISomeInterface someInterface) : base(someInterface) { }
public Task <ISomeInterface> RoundTripInterface(ISomeInterface input) { return(Task.FromResult(input)); }
public void DoStuff(ISomeInterface dependency) { }
public ClassThatWantsToUseAdapteeClass(ISomeInterface s) { something = s; }
public void SetUp() { _mock1 = MockRepository.GenerateMock<ISomeInterface>(); _invocationInfoRenderer = new InMemoryInvocationInfoRenderer(); }