Skip to content
Permalink
Browse files

DirectoryWatcherBase - CreateNullPath

  • Loading branch information
bobbymcr committed Feb 10, 2020
1 parent c4a4197 commit 1297d9b9bcb228e82e294a417377eca7ae30f686
@@ -0,0 +1,36 @@
// <copyright file="DirectoryWatcherBaseTest.cs" company="Brian Rogers">
// Copyright (c) Brian Rogers. All rights reserved.
// </copyright>

namespace DirectoryWatcherSample.Test
{
using System;
using System.IO;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public sealed class DirectoryWatcherBaseTest
{
[TestMethod]
public void CreateNullPath()
{
DirectoryInfo path = null;

Action act = () => new FakeDirectoryWatcher(path);

act.Should().Throw<ArgumentNullException>().Which.ParamName.Should().Be("path");
}

private sealed class FakeDirectoryWatcher
{
public FakeDirectoryWatcher(DirectoryInfo path)
{
if (path == null)
{
throw new ArgumentNullException(nameof(path));
}
}
}
}
}

This file was deleted.

0 comments on commit 1297d9b

Please sign in to comment.
You can’t perform that action at this time.