Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
80810members
346871posts

No "AddRange" method in Mongoose.Service.Data.MongooseDbContext

Solved
Lydia
Lieutenant JG
Lieutenant JG

No "AddRange" method in Mongoose.Service.Data.MongooseDbContext

I am currently writing a unit test for my processor using instructions from Chapter 6 of the SmartConnector Developers Guide. My processor currently works in an actual SmartConnector runtime; however, I receive errors when I perform any test. My tests are CancelTest, ExecuteTest, FixtureOneTimeSetup_Base, and ValidateTest. My code looks near exactly to the code in Chapter 6 of the SmartConnector Developers Guide and contains no syntax errors.

 

When I try to test my processor (using NUnit3 in Visual Studio 2019), I receive the following messages for all tests:

 

OneTimeSetUp: System.TypeLoadException : Method 'AddRange' in type 'Mongoose.Service.Data.MongooseDbContext' from assembly 'Mongoose.Service, Version=2.4.23.0, Culture=neutral, PublicKeyToken=223885051a9a1eff' does not have an implementation.

 

When I look closely into Mongoose.Service, I don't see the method "AddRange". I can tell that my processor is trying to execute the "Execute_Subclass" method in the processor, but I am unable to create a new EwsServerDataAdapter. Even when I have the following --- EwsServer = EwsServerDataAdapter.ConnectExisting(Name, Username, Password) --- it still doesn't seem to be able to create the EwsServerDataAdapter. 

 

Is there something I am missing or calling incorrectly? 

 

using Mongoose.Process;
using Mongoose.Test;
using Mongoose.Test.Processors;
using NUnit.Framework;
using SmartConnectorRuntime = Mongoose.Service.Mongoose;

namespace SetupProcessorFixture
{
    [TestFixture]
    public class SetupProcessorFixture : SmartConnectorTestFixtureBase, IProcessorTestFixture<eDriveSCProcessor.eDriveSCProcessor>
    {
        protected override void FixtrueOneTimeTearDown_Base()
        {
            SmartConnectorRuntime.InitIoC();
        }
        public eDriveSCProcessor.eDriveSCProcessor CreateTestableProcessor()
        {
            var processor = this.CreateProccessorInstanceWithDefaultValues();
            return processor;
        }
        [Test]
        public void CancelTest()
        {
            this.RunCancelTest();
        }
        [Test]
        public void ExecuteTest()
        {
            this.RunExecuteTest();
        }
        [Test]
        public void ValidateTest()
        {
            eDriveSCProcessor.eDriveSCProcessor processor = CreateTestableProcessor();

            // verify that processor has no issues
            var issues = this.ValidateProcessor(processor);
            Assert.AreEqual(0, issues.Count);

            // Mess with the processor to verify the things we want validated...
        }
        [Test]
        protected override void FixtureOneTimeSetup_Base()
        {
            SmartConnectorRuntime.InitIoC();
        }
    }
}

Accepted Solutions
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)

Re: No "AddRange" method in Mongoose.Service.Data.MongooseDbContext

Hi @Lydia,

 

This is most likely caused by the Smart Connector version you have installed on your PC, being older than your NuGet packages. The 'AddRange' methods were adding in versions 2.4.36 and newer.

 

If you upgrade your Smart Connector framework version install on your PC to the latest (2.4.38 for example), I believe this issue will be resolved.

 

Best Regards,

 

-Jeff

See Answer In Context

Tags (1)
2 Replies 2
JeffBowman
Schneider Alumni (Retired)
Schneider Alumni (Retired)

Re: No "AddRange" method in Mongoose.Service.Data.MongooseDbContext

Hi @Lydia,

 

This is most likely caused by the Smart Connector version you have installed on your PC, being older than your NuGet packages. The 'AddRange' methods were adding in versions 2.4.36 and newer.

 

If you upgrade your Smart Connector framework version install on your PC to the latest (2.4.38 for example), I believe this issue will be resolved.

 

Best Regards,

 

-Jeff

Tags (1)
Lydia
Lieutenant JG
Lieutenant JG
0 Likes
0
139

Re: No "AddRange" method in Mongoose.Service.Data.MongooseDbContext

The SmartConnector upgrade fixed the problem beautifully. Thank you.

Tags (1)