SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
Hi,
I made a extension and test extension. but when I tried Execute Test/Debug Selected Test I am getting error:
"An exception of type 'System.NotImplementedException' occurred in Hbys.Extension.Test.dll but was not handled in user code"
I added to app.config ;
<connectionStrings>
<add name="SmartConnectorDb" providerName="System.Data.SqlClient" connectionString="Server=localhost\SQLEXPRESS;Database=SmartConnector.Service;User Id=sa;Password=123456" />
<add name="SmartConnectorUserDb" providerName="System.Data.SqlClient" connectionString="Server=localhost\SQLEXPRESS;Database=SmartConnector.User;User Id=sa;Password=123456" />
</connectionStrings>
<appSettings>
<add key="EncryptionKey" value="xddadadsaasd" />
</appSettings>
what is the problem? how can I solve?
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
I tried to add test again. when I finish everthing there is error;
maybe it can help you. then I click add to reference everthing is looking ok when I rebuild.
Link copied. Please paste this link to share this article on your social media post.
On another extension and test.extension it is working on same computer. I can debug.
Link copied. Please paste this link to share this article on your social media post.
Hi Kanber,
Can you post your test fixture code here?
Best Regards,
-Jeff
Link copied. Please paste this link to share this article on your social media post.
Hi Jeff,
there is the code;
using System;
using Mongoose.Common;
using Mongoose.Configuration;
using Mongoose.Process;
using Mongoose.Test.Processors;
using SxL.Common;
using NUnit.Framework;
using SmartConnector = Mongoose.Service.Mongoose;
using Fire.Extension;
namespace Hbys.Extension.Test
{
public class HbysDiscoveryProcessorTestFixture : IProcessorTestFixture<FireDiscoveryProcessor>
{
#region FixtureSetup
[OneTimeSetUp]
public void FixtureSetup()
{
try
{
SmartConnector.InitIoC();
}
catch (Exception ex)
{
Logger.LogError(LogCategory.Testing, ex);
throw;
}
}
#endregion
#region CreateTestableProcessor - IProcessorFixture Member
private FireDiscoveryProcessor _processor;
public FireDiscoveryProcessor CreateTestableProcessor()
{
if (_processor != null) return _processor;
Type processorType;
ActivatorHelper.ActivateObject<Processor>("Fire.Extension.dll", "Fire.Extension.FireDiscoveryProcessor", out processorType);
var config = ProcessConfiguration.ExtractConfiguration(processorType);
_processor = config.InstantiateInstance() as FireDiscoveryProcessor;
Assert.NotNull(_processor, "Could not create a testable processor");
return _processor;
}
#endregion
#region ValidateTest - IProcessorFixture Member
[Test]
public void ValidateTest()
{
throw new NotImplementedException();
}
#endregion
#region CancelTest - IProcessorFixture Member
[Test]
public void CancelTest()
{
this.RunCancelTest();
}
#endregion
#region ExecuteTest - IProcessorFixture Member
[Test]
public void ExecuteTest()
{
this.RunExecuteTest();
}
FireDiscoveryProcessor IProcessorTestFixture<FireDiscoveryProcessor>.CreateTestableProcessor()
{
throw new NotImplementedException();
}
#endregion
}
}
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.