public void Should_Throw_If_Path_Is_Null()
            {
                // Given
                var parser = new AssemblyFrameworkNameParser(Substitute.For <IFrameworkNameParser>());

                // When
                var result = Record.Exception(() => parser.Parse(null));

                // Then
                Assert.IsArgumentNullException(result, "path");
            }
            public void Should_Parse_Framework_Name_Tokens_From_Path(string path, string expectedFrameworkNameIdentifier)
            {
                // Given
                var dummyValidFrameworkTokens = new[] { "fx1", "fx2" };

                var nameParser = Substitute.For <IFrameworkNameParser>();

                nameParser.ParseFrameworkName(Arg.Any <string>()).Returns(ci =>
                {
                    var token = ci.Arg <string>();
                    return(new FrameworkName(dummyValidFrameworkTokens.Contains(token) ? token : "Unsupported",
                                             new Version()));
                });

                var pathParser = new AssemblyFrameworkNameParser(nameParser);

                // When
                var result = pathParser.Parse(path);

                // Then
                Assert.Equal(expectedFrameworkNameIdentifier, result != null ? result.Identifier : null);
            }