public void UnknownOperationNameWithProfileTest(string name)
 {
     try
     {
         IBusinessOperation opt = FactoryBusinessOperation.CreateBusinessOperationObject("DEFAULT", name);
         Assert.True(false, "Exception shoud be throw for unknow API!!!");
     }
     catch (Exception e)
     {
         Assert.True(true, e.Message);
     }
 }
        public FactoryBusinessOperationTest()
        {
            Assembly asm = Assembly.GetExecutingAssembly();

            FactoryBusinessOperation.ClearRegisteredItems();

            FactoryBusinessOperation.RegisterBusinessOperation(asm, "BusinessOperationMocked", "Its.Onix.Core.Business.BusinessOperationMocked");
            FactoryBusinessOperation.SetLoggerFactory(new Mock <ILoggerFactory>().Object);

            Dictionary <string, PluginEntry> items = new Dictionary <string, PluginEntry>();

            items.Add("BusinessOperationMocked_1", new PluginEntry(asm, "BusinessOperationMocked_1", "Its.Onix.Core.Business.BusinessOperationMocked"));
            items.Add("BusinessOperationMocked_2", new PluginEntry(asm, "BusinessOperationMocked_2", "Its.Onix.Core.Business.BusinessOperationMocked"));
            items.Add("BusinessOperationMocked_3", new PluginEntry(asm, "BusinessOperationMocked_3", "Its.Onix.Core.Business.BusinessOperationMocked"));
            items.Add("BusinessOperationMocked_4", new PluginEntry(asm, "BusinessOperationMocked_4", "Its.Onix.Core.Business.BusinessOperationMocked"));
            FactoryBusinessOperation.RegisterBusinessOperations(items);
        }
        public void RegisterBusinessOperationWithProfileTest(string profile, string name)
        {
            IBusinessOperation opt = FactoryBusinessOperation.CreateBusinessOperationObject(profile, name);

            Assert.IsInstanceOf(typeof(BusinessOperationMocked), opt, "Should get the right object instance!!!");
        }