public void Create_with_constant_concerete_dependency_uses_constant() { //Arrange var mocker = new AutoMoqer(); var constant = new VirtualDependency() { PropValue = Guid.NewGuid().ToString() }; mocker.SetInstance(constant); //Act var result = mocker.Create <ClassWithVirtualDependencies>().GetVirtualProperty(); //Assert Assert.Equal((object)constant.PropValue, result); }
public ClassWithVirtualDependencies(IDependency dependency, VirtualDependency virtualDependency) { _virtualDependency = virtualDependency; Dependency = dependency; }