Skip to content

Instantly share code, notes, and snippets.

@extrawurst
Created November 11, 2020 20:38
Show Gist options
  • Save extrawurst/2fdb82dcfdfc7262188aa6c99466430d to your computer and use it in GitHub Desktop.
Save extrawurst/2fdb82dcfdfc7262188aa6c99466430d to your computer and use it in GitHub Desktop.
var level = Substitute.For<ILevel>();
var buildings = Substitute.For<IBuildings>();
// test subject:
var build = new BuildController(null,buildings,level);
// smoke test
Assert.AreEqual(0, build.GetCurrentBuildCount());
// assert that `GetCurrent` was exactly called once
level.ReceivedWithAnyArgs(1).GetCurrent();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment