public void DoStuffWithNullValueWillThrow(NameAppender sut, ISomeContext ctx) { // Fixture setup // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => sut.DoStuff(null, ctx)); // Teardown }
public void DoStuffWithNullValueWillThrow(NameAppender sut, ISomeContext ctx) { // Fixture setup // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.DoStuff(null, ctx)); // Teardown }
public string DoStuff(SomeValue value, ISomeContext context) { if (context == null) { throw new ArgumentNullException("context"); } return context.Name; }
public string DoStuff(SomeValue value, ISomeContext context) { if (context == null) { throw new ArgumentNullException("context"); } return(context.Name); }
public AddInClient(IEnumerable<IAddIn> addIns) { if (addIns == null) { throw new ArgumentNullException("addIns"); } this.addIns = addIns; this.context = new AddInClientContext(); }
public AddInClient(IEnumerable <IAddIn> addIns) { if (addIns == null) { throw new ArgumentNullException("addIns"); } this.addIns = addIns; this.context = new AddInClientContext(); }
public void DoStuffWithNullContextWillThrow(SomeClass sut, SomeValue sv) { // Fixture setup ISomeContext nullContext = null; // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.DoStuff(sv, nullContext)); // Teardown }
public string DoStuff(SomeValue value, ISomeContext context) { return(new string(value.Message.Reverse().ToArray())); }
public SomeService(ISomeContext context) { _context = context; }
public string DoStuff(SomeValue value, ISomeContext context) { return new string(value.Message.Reverse().ToArray()); }
public void DoStuff(ISomeContext context) { // do something based on context }