Beispiel #1
0
        public void FakeController_SimpleTest()
        {
            var fakeController = new FakeController();
            var messageList    = new List <string>();

            fakeController.SentOut = (newStrSent) => messageList.Add(newStrSent);
            var args = "fake -o1 1 -o2 hello".Split(' ');
            var opts = OptionsParser.Parse(args, fakeController.GetPossibleOptions(args));

            fakeController.Invoke(opts);
            Assert.That(messageList, Is.EquivalentTo(new string[] { "1", "hello" }));
        }