Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • yann 13 posts 32 karma points
    Oct 30, 2012 @ 05:27
    yann
    0

    uCommerce in Visual studio TestProject

    Hi

    I was wondering if anybody has setup some TestProject in visual studio with uCommerce?

    I have followed the advice on the following page to setup the test project: http://www.publicvoid.dk/EnableTheUCommerceEcommerceAPIOutsideTheWebContext.aspx

    On the code I have something simple

            [TestMethod]
            public void GetAccessCode()
            {
                ProductCatalog catalogInternal = ProductCatalog.Get(23);
    }

    but this is throwing me an error: in Castle.Windsor.Configuration.Interpreters.XmlProcessor.ConfigurationProcessingException:

    {"Error processing node resource FileResource: [] []"}

    Thank you for your help

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Nov 02, 2012 @ 09:57
    Søren Spelling Lund
    0

    While it's possible to have database access in your tetsts you typicallyshouldn't need it.

    To make your tests perform better the best approach is to new the object you need a populate it with your test values, e.g.

    var catalog = new { Name = "MyTestCatalog" };
    Assert.That(catalog.Name, Is.EqualTo("MyTestCatalog")); 

    Having said that the API should work in your tests. Could you let me know following:

    1) Which version you're on

    2) Whether you copified in components.config and related config files?

    My guess is that uCommerce can't find components.config.

Please Sign in or register to post replies

Write your reply to:

Draft