Beispiel #1
0
 public void TestInitialize()
 {
     this.stubInterface3         = MockRepository.GenerateStub <IInterface3>();
     this.stubInterface4         = MockRepository.GenerateStub <IInterface4>();
     this.stubSomeInterface      = MockRepository.GenerateStub <ISomeInterface>();
     this.stubSomeOtherInterface = MockRepository.GenerateStub <ISomeOtherInterface>();
 }
 public void TestInitialize()
 {
     this.subInterface3         = Substitute.For <IInterface3>();
     this.subInterface4         = Substitute.For <IInterface4>();
     this.subSomeInterface      = Substitute.For <ISomeInterface>();
     this.subSomeOtherInterface = Substitute.For <ISomeOtherInterface>();
 }
        private void RegisterDependencies()
        {
            Type t = typeof(IInterface3);
            GlobalIocContainer.Instance().RegisterUserSpecificITypesOf(t.Assembly);

            Impl = GlobalIocContainer.Instance().Resolve<IInterface3>();
        }
 public Interface2_Impl3(DateTime param1, double param2, IInterface3 param3)
 {
     Property1 = param1;
     Property2 = param2;
     Property3 = param3;
     Param3_InitializedInConstructor = param3;
 }
Beispiel #5
0
 public void TestInitialize()
 {
     this.fakeInterface3         = A.Fake <IInterface3>();
     this.fakeInterface4         = A.Fake <IInterface4>();
     this.fakeSomeInterface      = A.Fake <ISomeInterface>();
     this.fakeSomeOtherInterface = A.Fake <ISomeOtherInterface>();
 }
 public void TestInitialize()
 {
     this.fakeInterface3 = A.Fake <IInterface3>();
     this.fakeGenericInterfaceListInt = A.Fake <IGenericInterface <List <int> > >();
     this.fakeGenericInterfaceListSomeOtherInterface = A.Fake <IGenericInterface <List <ISomeOtherInterface> > >();
     this.fakeGenericInterfaceBool       = A.Fake <IGenericInterface <bool> >();
     this.fakeGenericInterfaceListString = A.Fake <IGenericInterface <List <string> > >();
     this.fakeSomeInterface = A.Fake <ISomeInterface>();
 }
 public void SetUp()
 {
     this.mockInterface3 = Mock.Create <IInterface3>();
     this.mockGenericInterfaceListInt = Mock.Create <IGenericInterface <List <int> > >();
     this.mockGenericInterfaceListSomeOtherInterface = Mock.Create <IGenericInterface <List <ISomeOtherInterface> > >();
     this.mockGenericInterfaceBool       = Mock.Create <IGenericInterface <bool> >();
     this.mockGenericInterfaceListString = Mock.Create <IGenericInterface <List <string> > >();
     this.mockSomeInterface = Mock.Create <ISomeInterface>();
 }
Beispiel #8
0
 public ClassWithGenericInterfaceTests()
 {
     this.subInterface3 = Substitute.For <IInterface3>();
     this.subGenericInterfaceListInt = Substitute.For <IGenericInterface <List <int> > >();
     this.subGenericInterfaceListSomeOtherInterface = Substitute.For <IGenericInterface <List <ISomeOtherInterface> > >();
     this.subGenericInterfaceBool       = Substitute.For <IGenericInterface <bool> >();
     this.subGenericInterfaceListString = Substitute.For <IGenericInterface <List <string> > >();
     this.subSomeInterface = Substitute.For <ISomeInterface>();
 }
Beispiel #9
0
 public void SetUp()
 {
     this.stubInterface3 = MockRepository.GenerateStub <IInterface3>();
     this.stubGenericInterfaceListInt = MockRepository.GenerateStub <IGenericInterface <List <int> > >();
     this.stubGenericInterfaceListSomeOtherInterface = MockRepository.GenerateStub <IGenericInterface <List <ISomeOtherInterface> > >();
     this.stubGenericInterfaceBool       = MockRepository.GenerateStub <IGenericInterface <bool> >();
     this.stubGenericInterfaceListString = MockRepository.GenerateStub <IGenericInterface <List <string> > >();
     this.stubSomeInterface = MockRepository.GenerateStub <ISomeInterface>();
 }
Beispiel #10
0
 public void TestInitialize()
 {
     this.subInterface3 = Substitute.For <IInterface3>();
     this.subGenericInterfaceListInt = Substitute.For <IGenericInterface <List <int> > >();
     this.subGenericInterfaceListSomeOtherInterface = Substitute.For <IGenericInterface <List <ISomeOtherInterface> > >();
     this.subGenericInterfaceBool       = Substitute.For <IGenericInterface <bool> >();
     this.subGenericInterfaceListString = Substitute.For <IGenericInterface <List <string> > >();
     this.subSomeInterface = Substitute.For <ISomeInterface>();
 }
Beispiel #11
0
 public ClassWithGenericInterfaceTests()
 {
     this.fakeInterface3 = A.Fake <IInterface3>();
     this.fakeGenericInterfaceListInt = A.Fake <IGenericInterface <List <int> > >();
     this.fakeGenericInterfaceListSomeOtherInterface = A.Fake <IGenericInterface <List <ISomeOtherInterface> > >();
     this.fakeGenericInterfaceBool       = A.Fake <IGenericInterface <bool> >();
     this.fakeGenericInterfaceListString = A.Fake <IGenericInterface <List <string> > >();
     this.fakeSomeInterface = A.Fake <ISomeInterface>();
 }
        public void MethodWithNamespaceQualifiedArgument_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         classWithMethods = this.CreateClassWithMethods();
            IInterface3 myInterface      = null;

            // Act
            var result = classWithMethods.MethodWithNamespaceQualifiedArgument(
                myInterface);

            // Assert
            Assert.Fail();
        }
Beispiel #13
0
        public void MethodWithNamespaceQualifiedArgument_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         mocker           = new AutoMoqer();
            var         classWithMethods = mocker.Create <ClassWithMethods>();
            IInterface3 myInterface      = null;

            // Act
            var result = classWithMethods.MethodWithNamespaceQualifiedArgument(
                myInterface);

            // Assert
            Assert.Fail();
        }
        public async Task GetBoolTaskNoAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         classWithMethods = new ClassWithMethods(TODO, TODO);
            IInterface3 interface3       = null;
            DateTime    time             = default(global::System.DateTime);

            // Act
            var result = await classWithMethods.GetBoolTaskNoAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
        }
Beispiel #15
0
        public async Task GetBoolTaskNoAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         unitUnderTest = new ClassWithMethods(TODO, TODO);
            IInterface3 interface3    = TODO;
            DateTime    time          = TODO;

            // Act
            var result = await unitUnderTest.GetBoolTaskNoAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
        }
        public async Task GetBoolTaskAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         unitUnderTest = this.CreateClassWithMethods();
            IInterface3 interface3    = TODO;
            DateTime    time          = TODO;

            // Act
            var result = await unitUnderTest.GetBoolTaskAsync(
                interface3,
                time);

            // Assert
            Assert.True(false);
        }
        public async Task GetTaskNoAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         classWithMethods = this.CreateClassWithMethods();
            IInterface3 interface3       = null;
            DateTime    time             = default(global::System.DateTime);

            // Act
            await classWithMethods.GetTaskNoAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
        }
        public async Task GetTaskNoAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         unitUnderTest = this.CreateClassWithMethods();
            IInterface3 interface3    = TODO;
            DateTime    time          = TODO;

            // Act
            await unitUnderTest.GetTaskNoAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
        }
        public async Task GetBoolTaskAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         classWithMethods = this.CreateClassWithMethods();
            IInterface3 interface3       = null;
            DateTime    time             = default(global::System.DateTime);

            // Act
            var result = await classWithMethods.GetBoolTaskAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
            this.mockRepository.VerifyAll();
        }
Beispiel #20
0
        public async Task GetBoolTaskAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         mocker           = new AutoMoqer();
            var         classWithMethods = mocker.Create <ClassWithMethods>();
            IInterface3 interface3       = null;
            DateTime    time             = default(global::System.DateTime);

            // Act
            var result = await classWithMethods.GetBoolTaskAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
        }
        public async Task GetTaskNoAsync_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            var         mocker        = new AutoMoqer();
            var         unitUnderTest = mocker.Create <ClassWithMethods>();
            IInterface3 interface3    = TODO;
            DateTime    time          = TODO;

            // Act
            await unitUnderTest.GetTaskNoAsync(
                interface3,
                time);

            // Assert
            Assert.Fail();
        }
 public Class4(IInterface3 p1, IInterface4 p2 = null) {}
Beispiel #23
0
 public Class2(Class1 class1, IInterface3 class3)
 {
     _class1 = class1;
     _class3 = class3;
 }
 public void TestInitialize()
 {
     this.mockInterface3         = Mock.Create <IInterface3>();
     this.mockSomeInterface      = Mock.Create <ISomeInterface>();
     this.mockSomeOtherInterface = Mock.Create <ISomeOtherInterface>();
 }
 public Class1(IInterface3 p1, IInterface4 p2)
 {
 }
 public Interface2_Impl1(DateTime param1, double param2, IInterface3 param3)
 {
     Property1 = param1;
     Property2 = param2;
     Property3 = param3;
 }
 public Task <bool> GetBoolTaskNoAsync(IInterface3 interface3, DateTime time)
 {
     return(Task.FromResult(true));
 }
Beispiel #28
0
 public ClassWithDeeperRedundantDependencies(IInterface3 dependency1, IInterface1 dependency2)
 {
     Dependency2 = dependency2;
     Dependency1 = dependency1;
 }
Beispiel #29
0
 public ClassWithDeeperDependency(IInterface3 dependency)
 {
     Dependency = dependency;
 }
 public Class3(IInterface3 p1)
 {
 }
 public Class4(IInterface3 p1, IInterface4 p2 = null)
 {
 }
 public Class3(IInterface3 p1) {}
 public Task GetTaskNoAsync(IInterface3 interface3, DateTime time)
 {
     return(Task.Delay(1));
 }
 public Class1(IInterface3 p1, IInterface4 p2) {}