Exemplo n.º 1
0
        public void EventhandlerBucket()
        {
            BucketEventHandlers eventHandlers = new BucketEventHandlers();
            Action action = () => eventHandlers.AddBucket();

            Assert.ThrowsException <Exception>(action, "Event Handler Working");
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //Program program = new Program();
            //BucketEventHandlers bucketEvent = new BucketEventHandlers();
            //bucketEvent.ExecutionEventHandler += new BucketEventHandlers.ExecutionDelegate(program.DoSomething);
            //bucketEvent.ExecutionEventHandler();
            //StaticEventHandlers.bucketEvent.ExecutionEventHandler += new EventHandlers.BucketEventHandlers.ExecutionDelegate(program.DoSomething);
            //StaticEventHandlers.bucketEvent.ExecutionEventHandler();
            //program.Something += new MyEventHandler(program.DoSomething);
            //program.Something -= new MyEventHandler(program.DoSomething);
            //program.Something();
            //IDataService item = MockDataService.GetMockDataService();

            Console.WriteLine(@"\______   \__ __   ____ |  | __ _____/  |_   /  _____/_____    _____   ____  ");
            Console.WriteLine(@" |    |  _/  |  \_/ ___\|  |/ // __ \   __\ /   \  ___\__  \  /     \_/ __ \ ");
            Console.WriteLine(@" |    |   \  |  /\  \___|    <\  ___/|  |   \    \_\  \/ __ \|  Y Y  \  ___/ ");
            Console.WriteLine(@" |______  /____/  \___  >__|_ \\___  >__|    \______  (____  /__|_|  /\___  >");
            Console.WriteLine(@"       \/            \/     \/    \/               \/     \/      \/     \/ ");
            Console.WriteLine(" ");
            Console.WriteLine("Generating a bucket");
            BucketEventHandlers iem = new BucketEventHandlers(new BucketEventHandlers());

            iem.AddBucket();
        }