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)
			{
			}
Example #5
0
 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");
 }
Example #6
0
        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;
 }
Example #10
0
 public MultiInterfaceImplementation(ISomeInterface[] someInterfaces)
 {
     this.SomeInterfaces = someInterfaces;
 }
 public A(ISomeInterface someInterface)
 {
     this.someInterface = someInterface;
 }
 public MixedInjectedClassSingle(ISomeInterface someInterface)
 {
     this.someInterface = someInterface;
 }
Example #13
0
 public FileScopedNamespace(ISomeInterface someInterface)
 {
     this.someInterface = someInterface;
 }
Example #14
0
 public SomeDecoratingImplementation(ISomeInterface somethingToDecorate)
 {
     this.somethingToDecorate = somethingToDecorate;
 }
Example #15
0
 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);
 }
Example #17
0
 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);
 }
Example #19
0
 public MyClass(ISomeInterface someInterface)
 {
     // Either use someInterface or store it in a private readonly field.
 }
Example #20
0
 public MixedInjectedClassMultiple(ISomeInterface someInterface, ISomeOtherInterface someOtherInterface)
 {
     this.someInterface      = someInterface;
     this.someOtherInterface = someOtherInterface;
 }
 public ClassForTestingWithInterface(ISomeInterface baseClass)
 {
Example #22
0
 public ConstructorInjectionHandler(ISomeInterface dependency)
 {
     Dependency = dependency;
 }
 public SomeClassWithDependencies(ISomeInterface someInterface, ISomeOtherInterface someOtherInterface)
 {
     _someInterface = someInterface;
     _someOtherInterface = someOtherInterface;
 }
Example #24
0
 public CustomTextBox()
 {
     this.SomeInterface = new TextBoxSomeInterface(this);
 }
Example #25
0
 public void Set <T>(ISomeInterface <T> value)
 {
     Item <T> .Value = value;
 }
 public ThreadSafe(ISomeInterface contained)
 {
     this.Contained = contained;
 }
Example #27
0
 public void TestInitialize()
 {
     this.subSomeInterface = Substitute.For <ISomeInterface>();
 }
Example #28
0
 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 A(ISomeInterface someInterface)
 {
     this.someInterface = someInterface;
 }
 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>();
 }
Example #34
0
 public ImportSomeInterface(ISomeInterface someInterface)
 {
     _someInterface = someInterface;
 }
Example #35
0
 public AnotherInterfaceImplementation(ISomeInterface someInterface)
 {
     this.SomeInterface = someInterface;
 }
Example #36
0
 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;
 }
Example #38
0
 public AnotherInterfaceImplementation(ISomeInterface someInterface)
 {
     this.SomeInterface = someInterface;
 }
 public OtherConcreteClass(ISomeInterface some)
 {
     Some = some;
 }
Example #40
0
 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();
 }
Example #45
0
 public ObjectWithOptionalConstructorParameter([OptionalDependency] ISomeInterface someInterface)
 {
     this.someInterface = someInterface;
 }
 public SomeDecoratingImplementation(ISomeInterface somethingToDecorate)
 {
     this.somethingToDecorate = somethingToDecorate;
 }
Example #47
0
 public ObjectWithNamedOptionalConstructorParameter([OptionalDependency("named")] ISomeInterface someInterface)
     : base(someInterface)
 {
 }
 public Task <ISomeInterface> RoundTripInterface(ISomeInterface input)
 {
     return(Task.FromResult(input));
 }
Example #49
0
 public void DoStuff(ISomeInterface dependency)
 {
 }
Example #50
0
 public ClassThatWantsToUseAdapteeClass(ISomeInterface s)
 {
     something = s;
 }
 public ObjectWithOptionalConstructorParameter([OptionalDependency] ISomeInterface someInterface)
 {
     this.someInterface = someInterface;
 }
 public void SetUp()
 {
     _mock1 = MockRepository.GenerateMock<ISomeInterface>();
     _invocationInfoRenderer = new InMemoryInvocationInfoRenderer();
 }