Search Results

Search found 55 results on 3 pages for 'nbolton'.

Page 3/3 | < Previous Page | 1 2 3 

  • Is it a bad idea to create tests that rely on each other within a test fixture?

    - by nbolton
    For example: // NUnit-like pseudo code (within a TestFixture) Ctor() { m_globalVar = getFoo(); } [Test] Create() { a(m_globalVar) } [Test] Delete() { // depends on Create being run b(m_globalVar) } … or… // NUnit-like pseudo code (within a TestFixture) [Test] CreateAndDelete() { Foo foo = getFoo(); a(foo); // depends on Create being run b(foo); } … I’m going with the later, and assuming that the answer to my question is: No, at least not with NUnit, because according to the NUnit manual: The constructor should not have any side effects, since NUnit may construct the class multiple times in the course of a session. ... also, can I assume it's bad practice in general? Since tests can usually be run separately. So the result of Create may never be cleaned up by Delete.

    Read the article

  • After upgrading to 2.6.35-24 kernel, why does adb no longer list devices?

    - by nbolton
    When I first installed Ubuntu 10.10 64-bit, I was able to see a physical Android device (connected via USB) in the Android Device Chooser (launched from Eclipse). But, after upgrading my kernel from 2.6.35-22-generic to 2.6.35-24-generic, no devices are listed any more, and I am unable to see any results when running adb devices like so: $ ./adb devices List of devices attached $ I have tried booting in the previous kernel version, but I get some udev error, so I was hoping I could get it working with the newer kernel version. I figured SO was the best place for this question, as it seems more developer related.

    Read the article

  • Should I use an interface or factory (and interface) for a cross-platform implementation?

    - by nbolton
    Example A: // pseudo code interface IFoo { void bar(); } class FooPlatformA : IFoo { void bar() { /* ... */ } } class FooPlatformB : IFoo { void bar() { /* ... */ } } class Foo : IFoo { IFoo m_foo; public Foo() { if (detectPlatformA()} { m_foo = new FooPlatformA(); } else { m_foo = new FooPlatformB(); } } // wrapper function - downside is we'd have to create one // of these for each function, which doesn't seem right. void bar() { m_foo.bar(); } } Main() { Foo foo = new Foo(); foo.bar(); } Example B: // pseudo code interface IFoo { void bar(); } class FooPlatformA : IFoo { void bar() { /* ... */ } } class FooPlatformB : IFoo { void bar() { /* ... */ } } class FooFactory { IFoo newFoo() { if (detectPlatformA()} { return new FooPlatformA(); } else { return new FooPlatformB(); } } } Main() { FooFactory factory = new FooFactory(); IFoo foo = factory.newFoo(); foo.bar(); } Which is the better option, example A, B, neither, or "it depends"?

    Read the article

  • Jquery with multi level json data array

    - by coder
    var data = [{"Address":{"Address":"4 Selby Road\nHowden","AddressId":"1414449","AddressLine1":"4 Selby Road","AddressLine2":"Howden","ContactId":"14248844","County":"North Humberside","Country":"UK","Postcode":"DN14 7JW","Town":"GOOLE","FullAddress":"4 Selby Road\nHowden\r\nGOOLE\r\nNorth Humberside\r\nDN14 7JW\r\nUnited Kingdom"},"ContactId":14248844,"Title":"Mrs","FirstName":"","Surname":"Neild","FullName":" Neild","PostCode":"DN14 7JW"},{"Address":{"Address":"466 Manchester Road\nBlackrod","AddressId":"1669615","AddressLine1":"466 Manchester Road","AddressLine2":"Blackrod","ContactId":"16721687","County":"","Country":"UK","Postcode":"BL6 5SU","Town":"BOLTON","FullAddress":"466 Manchester Road\nBlackrod\r\nBOLTON\r\nBL6 5SU\r\nUnited Kingdom"},"ContactId":16721687,"Title":"Miss","FirstName":"Andrea","Surname":"Neild","FullName":"Andrea Neild","PostCode":"BL6 5SU"},{"Address":{"Address":"5 Prospect Vale\nHeald Green","AddressId":"2127294","AddressLine1":"5 Prospect Vale","AddressLine2":"Heald Green","ContactId":"21178752","County":"Cheshire","Country":"UK","Postcode":"SK8 3RJ","Town":"CHEADLE","FullAddress":"5 Prospect Vale\nHeald Green\r\nCHEADLE\r\nCheshire\r\nSK8 3RJ\r\nUnited Kingdom"},"ContactId":21178752,"Title":"Mrs","FirstName":"","Surname":"Neild","FullName":" Neild","PostCode":"SK8 3RJ"}]; I'm tring to retrieve above json fommated data in jquery as below: var source = { localdata: data, sort: customsortfunc, datafields: [ { name: 'Surname', type: 'string' }, { name: 'FirstName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'Address.Address', type: 'string' } ], datatype: "array" }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid( { width: 670, source: dataAdapter, theme: theme, sortable: true, pageable: true, autoheight: true, ready: function () { //$("#jqxgrid").jqxGrid('sortby', 'firstname', 'asc'); $("#jqxgrid").jqxGrid('sortby', 'FirstName', 'asc'); }, columns: [ { text: 'Title', datafield: 'Title', width: 100 }, { text: 'First Name', datafield: 'FirstName', width: 100 }, { text: 'Last Name', datafield: 'Surname', width: 100 }, { text: 'Address', datafield: 'Address.Address', width: 100 }, ] }); The only issue is there is no display for "Address.Adress". Can anyone advise me ?

    Read the article

< Previous Page | 1 2 3