public class Caller { public virtual String Method(Argument arg) { throw new NotImplementedException(); } }
public struct Argument { // override object.Equals public override bool Equals(object obj) { throw new NotImplementedException(); }
// override object.GetHashCode public override int GetHashCode() { throw new NotImplementedException(); } }
public class Program { static void Main(string[] args) { Caller mock = NSubstitute.Substitute.ForPartsOf<Caller>(); var arg = NSubstitute.Arg.Any<Argument>(); mock.Method(arg).Returns("Okey!"); Console.Write(mock.Method(new Argument())); Console.ReadKey(); } }
--
You received this message because you are subscribed to the Google Groups "NSubstitute" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nsubstitute...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nsubstitute/af3773ab-93e8-4289-a380-6618532939d5%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nsubs...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nsubstitute...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nsubstitute/7aed05b1-5028-4816-a038-1e1c562be144%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nsubstitute/7aed05b1-5028-4816-a038-1e1c562be144%40googlegroups.com.