public void OptionIsNotNull_ReturnsFalse()
            {
                // Arrange
                string option = "not empty";

                // Act
                var shouldPrompt = ArgsParserAdapter.PublicShouldPrompt(option);

                // Assert
                Assert.False(shouldPrompt);
            }
            public void OptionIsNull_ReturnsTrue()
            {
                // Arrange
                string option = null;

                // Act
                var shouldPrompt = ArgsParserAdapter.PublicShouldPrompt(option);

                // Assert
                Assert.True(shouldPrompt);
            }
            public void MissingSettingsDescriptionAttribute_ReturnsNull()
            {
                // Arrange
                Type   type = typeof(StubSettings);
                string name = nameof(StubSettings.MissingSettingsDescriptionAttribute);

                // Act
                var description = ArgsParserAdapter.PublicGetDescription(type, name);

                // Assert
                Assert.Null(description);
            }
            public void PropertyDoesNotExist_ThrowsArgumentNullException()
            {
                // Arrange
                Type   type = typeof(StubSettings);
                string name = "!";

                // Act
                Assert.Throws <ArgumentNullException>(() =>
                {
                    ArgsParserAdapter.PublicGetDescription(type, name);
                });
            }
            public void NameIsNull_ThrowsArgumentNullException()
            {
                // Arrange
                Type   type = typeof(StubSettings);
                string name = null;

                // Act -> Assert
                Assert.Throws <ArgumentNullException>(() =>
                {
                    ArgsParserAdapter.PublicGetDescription(type, name);
                });
            }
            public void ReturnsArgsParser()
            {
                // Arrange
                TextReader inReader    = TextReader.Null;
                TextWriter outWriter   = TextWriter.Null;
                TextWriter errorWriter = TextWriter.Null;

                // Act
                var parser = new ArgsParserAdapter(inReader, outWriter, errorWriter);

                // Assert
                Assert.IsAssignableFrom <ArgsParserAdapter>(parser);
            }
 public ArgsParserTests()
 {
     inReader = mockInReader.Object;
     parser   = new ArgsParserAdapter(inReader, outWriter, errorWriter);
 }