コード例 #1
0
        public void GetExtensionsFromArgument_NullReturnsEmpty()
        {
            IArgumentProvider arguments = Substitute.For <IArgumentProvider>();

            arguments.GetOption <string>("Option").Returns((string)null);
            arguments.GetExtensionsFromArgument("Option").Should().BeEmpty();
        }
コード例 #2
0
        public void GetExtensionsFromArgument_BasicTest()
        {
            // Should split extensions across semicolons and trim leading asterisks
            IArgumentProvider arguments = Substitute.For <IArgumentProvider>();

            arguments.GetOption <string>("Option").Returns("*Bar;FooBar");
            arguments.GetExtensionsFromArgument("Option").Should().BeEquivalentTo("Bar", "FooBar");
        }