Beispiel #1
0
        public void Parameters_WithoutAutoPrefixes()
        {
            var s = new Sample_62();

            Expect(() => Parser.Run(new[]
                                        {
                                            "bar", "-c=5", "-n=bar"
                                        }, s),
                   Throws.InstanceOf<UnhandledParametersException>());
        }
Beispiel #2
0
 public void Parameters_WithoutAutoPrefixes()
 {
     var s = new Sample_62();
     Parser.Run(new[]
     {
         "bar","-c=5","-n=bar"
     }, s);
 }
Beispiel #3
0
        public void Parameters_WithAutoPrefixes()
        {
            var s = new Sample_62();
            Parser.Run(new[]
            {
                "foo","-c=5","-n=bar"
            }, s);

            Expect(s.Count, Is.EqualTo(5));
            Expect(s.Name, Is.EqualTo("bar"));
        }
Beispiel #4
0
        public void Parameters_WithAutoPrefixes()
        {
            var s = new Sample_62();
            Parser.Run(new[]
            {
                "foo","-c=5","-n=bar"
            }, s);

            Assert.AreEqual(5, s.Count);
            Assert.AreEqual("bar", s.Name);
        }