static void Main(string[] args) { SomeImplementation s = new SomeImplementation(); s.DoSomething(new SomeActualData()); s.DoSomething(new SomeOtherData()); Console.ReadLine(); }
public void Implement_Should_CauseImplementedClassToBeUsed() { // Arrange. var moqzilla = new Mocker(); var myObj = new SomeImplementation(); // Act. moqzilla.Implement <ISomeImplementation>(myObj); var output = moqzilla.Create <SomeClassWithSomeImplementationDependency>(); // Assert. output.SomeImplementation.Should().Be(myObj); }
public string DoSomething(string message) { ISomeInterface dependency = new SomeImplementation(); return dependency.DoStuff(message); }
public string DoSomething(string message) { ISomeInterface dependency = new SomeImplementation(); return(dependency.DoStuff(message)); }