public void SetUp() { this.config = new Mock<IConfigurationProvider>(); folderLocation = new Mock<IFolderLocation>(); config.Setup(c => c.Get<IFolderLocation>(FileProvider.FolderLocationConfigurationKey, projectShared)).Returns(folderLocation.Object); target = new FileProvider(config.Object); }
public void SetUp() { config = new Mock<IConfigurationProvider>(); target = new FileProvider(config.Object); }
public void Get_FolderMissing_Throws() { //Arrange target=new FileProvider(config.Object); SetupFolderPathConfig("abc"); //Act ActualValueDelegate targetAction = () => target.Get("a"); //Assert Assert.That(targetAction,Throws.TypeOf(typeof(DirectoryNotFoundException))); }