Esempio n. 1
0
        public void InitializeFromCmdLine_EmptyPrefix_CmdLineArgumentParsed()
        {
            var cmdLineObjectWithEmptyPrefix = new CmdLineObjectWithEmptyPrefix();

            cmdLineObjectWithEmptyPrefix.InitializeFromCmdLine("Car", "Lamborghini");

            cmdLineObjectWithEmptyPrefix.Car.Should().Be(Car.Lamborghini);
        }
Esempio n. 2
0
        public void InitializeFromCmdLine_EmptyPrefixArray_CmdLineArgumentParsed()
        {
            var cmdLineObjectWithEmptyPrefix = new CmdLineObjectWithEmptyPrefix();

            cmdLineObjectWithEmptyPrefix.InitializeFromCmdLine("Cars", "Tesla,Ferrari,Lamborghini");

            cmdLineObjectWithEmptyPrefix.Cars.ShouldBeEquivalentTo(new[] { Car.Tesla, Car.Ferrari, Car.Lamborghini });
        }