Ejemplo n.º 1
0
        public void Should_Remove_Plugin( )
        {
            Trigger testTrigger = new Trigger( 1, DateTime.Now, 10 );

            testTrigger.AddPlugin( new Example( 1, 1, "Example plugin" ) );
            testTrigger.RemovePlugin( 0 );

            Assert.IsEmpty( testTrigger.GetAllPlugins( ) );
        }
Ejemplo n.º 2
0
        public void Should_Create_Multiple_Plugins( )
        {
            Trigger testTrigger = new Trigger( 1, DateTime.Now, -1 );

            testTrigger.AddPlugin( new Example( 1, 1, "Example plugin" ) );
            testTrigger.AddPlugin( new Ping( 1, 1, "127.0.0.1" ) );
            testTrigger.AddPlugin( new Example( 1, 1, "Example plugin2" ) );
            testTrigger.AddPlugin( new Ping( 1, 1, "127.0.0.1" ) );

            Assert.AreEqual( 4, testTrigger.GetAllPlugins( ).Count( ) );
        }