public void ShouldCreateClassWithDependenciesAndSetup() { var magic = new MagicMoq.Moqer(); var foo = magic.Resolve <Foo>(); magic.GetMock <IFooDependency>().Setup(a => a.DoSomethingDifferent()).Returns(2); foo.DoSomething().Should().Be(2); }
public void ShouldCreateClassWithDependenciesAndVerify() { var magic = new MagicMoq.Moqer(); var foo = magic.Resolve <Foo>(); foo.DoSomething(); magic.GetMock <IFooDependency>().Verify(a => a.DoSomethingDifferent(), Times.Once()); }
public void ShouldCreateClassWithDependenciesAndVerify() { var magic = new MagicMoq.Moqer(); var foo = magic.Resolve<Foo>(); foo.DoSomething(); magic.GetMock<IFooDependency>().Verify(a => a.DoSomethingDifferent(), Times.Once()); }
public void ShouldCreateClassWithDependenciesAndSetup() { var magic = new MagicMoq.Moqer(); var foo = magic.Resolve<Foo>(); magic.GetMock<IFooDependency>().Setup(a => a.DoSomethingDifferent()).Returns(2); foo.DoSomething().Should().Be(2); }