05-23-2008 10:07 AM
I'm attempting to unit test a plugin, but I'm having issues getting ACT! to startup. This will execute but will throw an error first it shows this screen
I click "OK" and the appplication throws this exception
When_The_Project_Management_Plugin_Starts.Should_Create_Project_Entity : FailedSystem.IO.FileNotFoundException: Could not load file or assembly 'Act.Shared.Images, Version=10.2.191.0, Culture=neutral, PublicKeyToken=ebf6b2ff4d0a08aa' or one of its dependencies. The system cannot find the file specified.at Act.UI.Core.CommandBarControl.get_SmallImage()at Act.UI.Core.CommandBarButton.Add(CommandBarControl topLevelControl)at Act.UI.Core.CommandBar.Add()at Act.UI.Core.CommandBars.Add(CommandBar pBar, Boolean display)at Act.UI.Core.Explorer.LoadBar(String XMLFileName, String barName, CommandBarType barType)at Act.UI.Core.Explorer.LoadDisconnectedMenuToolBar()at Act.UI.ActApplication.InitializeExplorer()at Act.UI.ActApplication.InitializeApplication()at Act.UI.ActApplication..ctor(IDisposable splashScreen)
Here's the code. Any thoughts?
using NUnit.Framework;using Act.Framework;using Act.UI;namespace MyNameSpace.Tests{ [TestFixture] public class When_The_Plugin_Starts { private ActApplication _actApplication; private const string PROJECT_ENTITY_NAME = "PROJECT"; [SetUp] public void Run_Before_Any_TestAttribute() { _actApplication = new ActApplication(null); } [Test] public void Should_Create_Project_Entity() { Assert.IsTrue(_actApplication.ActFramework.CustomEntities.GetCustomEntityDescriptor(PROJECT_ENTITY_NAME) != null); } }}
05-23-2008 10:30 AM
Answered my own question the contents of the ACTInstallDir on the CD need to be copied to the "bin" output directory of the plugin.