public void CallLibgit_RetrieveStatus() { var repository = NSubstitute.Substitute.For <IRepository>(); StatusProvider statusProvider = new StatusProvider(repository); var filePath = "somePath"; statusProvider.Get(filePath); repository.Received().RetrieveStatus(filePath); }
public void ThrowAnException_WhenSuppliedPath_IsInvalid(string path) { StatusProvider statusProvider = new StatusProvider(null); Assert.Throws <ArgumentException>(() => statusProvider.Get(path)); }