コード例 #1
0
        public void TestResolveFalse(string input)
        {
            var resolver = new BoolResolver();

            var result = resolver.Resolve(new ArgumentModel {
                Value = input
            });

            Assert.False(result);
        }
コード例 #2
0
        public async Task BoolResolver_Resolves_TruthfulBools(
            [Values("1", "t", "true", "+", "y", "yes")]
            string argument)
        {
            // Assign
            var resolver = new BoolResolver(null);

            // Act
            var result = await resolver.ResolveAsync(null, null, argument);

            // Assert
            Assert.IsTrue(result);
        }