Search Results

Search found 47903 results on 1917 pages for 'test driven development'.

Page 13/1917 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • How do you formulate the Domain Model in Domain Driven Design properly (Bounded Contexts, Domains)?

    - by lko
    Say you have a few applications which deal with a few different Core Domains. The examples are made up and it's hard to put a real example with meaningful data together (concisely). In Domain Driven Design (DDD) when you start looking at Bounded Contexts and Domains/Sub Domains, it says that a Bounded Context is a "phase" in a lifecycle. An example of Context here would be within an ecommerce system. Although you could model this as a single system, it would also warrant splitting into separate Contexts. Each of these areas within the application have their own Ubiquitous Language, their own Model, and a way to talk to other Bounded Contexts to obtain the information they need. The Core, Sub, and Generic Domains are the area of expertise and can be numerous in complex applications. Say there is a long process dealing with an Entity for example a Book in a core domain. Now looking at the Bounded Contexts there can be a number of phases in the books life-cycle. Say outline, creation, correction, publish, sale phases. Now imagine a second core domain, perhaps a store domain. The publisher has its own branch of stores to sell books. The store can have a number of Bounded Contexts (life-cycle phases) for example a "Stock" or "Inventory" context. In the first domain there is probably a Book database table with basically just an ID to track the different book Entities in the different life-cycles. Now suppose you have 10+ supporting domains e.g. Users, Catalogs, Inventory, .. (hard to think of relevant examples). For example a DomainModel for the Book Outline phase, the Creation phase, Correction phase, Publish phase, Sale phase. Then for the Store core domain it probably has a number of life-cycle phases. public class BookId : Entity { public long Id { get; set; } } In the creation phase (Bounded Context) the book could be a simple class. public class Book : BookId { public string Title { get; set; } public List<string> Chapters { get; set; } //... } Whereas in the publish phase (Bounded Context) it would have all the text, release date etc. public class Book : BookId { public DateTime ReleaseDate { get; set; } //... } The immediate benefit I can see in separating by "life-cycle phase" is that it's a great way to separate business logic so there aren't mammoth all-encompassing Entities nor Domain Services. A problem I have is figuring out how to concretely define the rules to the physical layout of the Domain Model. A. Does the Domain Model get "modeled" so there are as many bounded contexts (separate projects etc.) as there are life-cycle phases across the core domains in a complex application? Edit: Answer to A. Yes, according to the answer by Alexey Zimarev there should be an entire "Domain" for each bounded context. B. Is the Domain Model typically arranged by Bounded Contexts (or Domains, or both)? Edit: Answer to B. Each Bounded Context should have its own complete "Domain" (Service/Entities/VO's/Repositories) C. Does it mean there can easily be 10's of "segregated" Domain Models and multiple projects can use it (the Entities/Value Objects)? Edit: Answer to C. There is a complete "Domain" for each Bounded Context and the Domain Model (Entity/VO layer/project) isn't "used" by the other Bounded Contexts directly, only via chosen paths (i.e. via Domain Events). The part that I am trying to figure out is how the Domain Model is actually implemented once you start to figure out your Bounded Contexts and Core/Sub Domains, particularly in complex applications. The goal is to establish the definitions which can help to separate Entities between the Bounded Contexts and Domains.

    Read the article

  • What are the tools used by modern desktop/"native" application developers? [closed]

    - by kunjaa
    Besides the usual editor and debugger, what do the modern desktop (windows and linux) application developers use for their development. I am more interested in profilers, code analyzers, memory analyzers, packaging tools, GUI frameworks, libraries and any other handy tools and secrets that you couldnt live without. For example, as a web application developer, I have my Firebug and its extensions, Wireshark, jQuery and its extensions, client side and server side mvc frameworks, selenium tests, jsfiddle etc. Edit : Ok let us constrain this by saying you are using C++

    Read the article

  • As the current draft stands, what is the most significant change the "National Strategy for Trusted Identities in Cyberspace" will provoke?

    - by mfg
    A current draft of the "National Strategy for Trusted Identities in Cyberspace" has been posted by the Department of Homeland Security. This question is not asking about privacy or constitutionality, but about how this act will impact developers' business models and development strategies. When the post was made I was reminded of Jeff's November blog post regarding an internet driver's license. Whether that is a perfect model or not, both approaches are attempting to handle a shared problem (of both developers and end users): How do we establish an online identity? The question I ask here is, with respect to the various burdens that would be imposed on developers and users, what are some of the major, foreseeable implementation issues that will arise from the current U.S. Government's proposed solution? For a quick primer on the setup, jump to page 12 for infrastructure components, here are two stand-outs: An Identity Provider (IDP) is responsible for the processes associated with enrolling a subject, and establishing and maintaining the digital identity associated with an individual or NPE. These processes include identity vetting and proofing, as well as revocation, suspension, and recovery of the digital identity. The IDP is responsible for issuing a credential, the information object or device used during a transaction to provide evidence of the subject’s identity; it may also provide linkage to authority, roles, rights, privileges, and other attributes. The credential can be stored on an identity medium, which is a device or object (physical or virtual) used for storing one or more credentials, claims, or attributes related to a subject. Identity media are widely available in many formats, such as smart cards, security chips embedded in PCs, cell phones, software based certificates, and USB devices. Selection of the appropriate credential is implementation specific and dependent on the risk tolerance of the participating entities. Here are the first considered actionable components of the draft: Action 1: Designate a Federal Agency to Lead the Public/Private Sector Efforts Associated with Achieving the Goals of the Strategy Action 2: Develop a Shared, Comprehensive Public/Private Sector Implementation Plan Action 3:Accelerate the Expansion of Federal Services, Pilots, and Policies that Align with the Identity Ecosystem Action 4:Work Among the Public/Private Sectors to Implement Enhanced Privacy Protections Action 5:Coordinate the Development and Refinement of Risk Models and Interoperability Standards Action 6: Address the Liability Concerns of Service Providers and Individuals Action 7: Perform Outreach and Awareness Across all Stakeholders Action 8: Continue Collaborating in International Efforts Action 9: Identify Other Means to Drive Adoption of the Identity Ecosystem across the Nation

    Read the article

  • Is Inheritance in Struts2 Model-Driven Action possible?

    - by mryan
    Hello, I have a Model-Driven Struts2 action that provides correct JSON response. When I re-structure the action I get an empty JSON response back. Has anyone got inheritance working with Struts2 Model-Driven actions? Ive tried explicitly setting include properties in struts config: <result name="json" type="json"> <param name="includeProperties"> jsonResponse </param> </result> Code for all actions below - not actual code in use - I have edited and stripped down for clarity. Thanks in advance. Action providing correct response: public class Bike extends ActionSupport implements ModelDriven, Preparable { @Autowired private Service bikeService; private JsonResponse jsonResponse; private com.ets.model.Vehicle bike; private int id; public Bike() { jsonResponse = new JsonResponse("Bike"); } @Override public void prepare() throws Exception { if (id == 0) { bike = new com.ets.model.Bike(); } else { bike = bikeService.find(id); } } @Override public Object getModel() { return bike; } public void setId(int id) { this.id = id; } public void setBikeService(@Qualifier("bikeService") Service bikeService) { this.bikeService = bikeService; } public JsonResponse getJsonResponse() { return jsonResponse; } public String delete() { try { bike.setDeleted(new Date(System.currentTimeMillis())); bikeService.updateOrSave(bike); jsonResponse.addActionedId(id); jsonResponse.setAction("delete"); jsonResponse.setValid(true); } catch (Exception exception) { jsonResponse.setMessage(exception.toString()); } return "json"; } } Re-structured Actions providing incorrect response: public abstract class Vehicle extends ActionSupport implements ModelDriven { @Autowired protected Service bikeService; @Autowired protected Service carService; protected JsonResponse jsonResponse; protected com.ets.model.Vehicle vehicle; protected int id; protected abstract Service service(); @Override public Object getModel() { return bike; } public void setId(int id) { this.id = id; } public void setBikeService(@Qualifier("bikeService") Service bikeService) { this.bikeService = bikeService; } public void setCarService(@Qualifier("carService") Service carService) { this.carService = carService; } public JsonResponse getJsonResponse() { return jsonResponse; } public String delete() { try { vehicle.setDeleted(new Date(System.currentTimeMillis())); service().updateOrSave(vehicle); jsonResponse.addActionedId(id); jsonResponse.setAction("delete"); jsonResponse.setValid(true); } catch (Exception exception) { jsonResponse.setMessage(exception.toString()); } return "json"; } } public class Bike extends Vehicle implements Preparable { public Bike() { jsonResponse = new JsonResponse("Bike"); } @Override public void prepare() throws Exception { if (id == 0) { vehicle = new com.ets.model.Bike(); } else { vehicle = bikeService.find(id); } } @Override protected Service service() { return bikeService; } } public class Car extends Vehicle implements Preparable { public Car() { jsonResponse = new JsonResponse("Car"); } @Override public void prepare() throws Exception { if (id == 0) { vehicle = new com.ets.model.Car(); } else { vehicle = carService.find(id); } } @Override protected Service service() { return carService; } }

    Read the article

  • Is there a clean separation of my layers with this attempt at Domain Driven Design in XAML and C#

    - by Buddy James
    I'm working on an application. I'm using a mixture of TDD and DDD. I'm working hard to separate the layers of my application and that is where my question comes in. My solution is laid out as follows Solution MyApp.Domain (WinRT class library) Entity (Folder) Interfaces(Folder) IPost.cs (Interface) BlogPosts.cs(Implementation of IPost) Service (Folder) Interfaces(Folder) IDataService.cs (Interface) BlogDataService.cs (Implementation of IDataService) MyApp.Presentation(Windows 8 XAML + C# application) ViewModels(Folder) BlogViewModel.cs App.xaml MainPage.xaml (Contains a property of BlogViewModel MyApp.Tests (WinRT Unit testing project used for my TDD) So I'm planning to use my ViewModel with the XAML UI I'm writing a test and define my interfaces in my system and I have the following code thus far. [TestMethod] public void Get_Zero_Blog_Posts_From_Presentation_Layer_Returns_Empty_Collection() { IBlogViewModel viewModel = _container.Resolve<IBlogViewModel>(); viewModel.LoadBlogPosts(0); Assert.AreEqual(0, viewModel.BlogPosts.Count, "There should be 0 blog posts."); } viewModel.BlogPosts is an ObservableCollection<IPost> Now.. my first thought is that I'd like the LoadBlogPosts method on the ViewModel to call a static method on the BlogPost entity. My problem is I feel like I need to inject the IDataService into the Entity object so that it promotes loose coupling. Here are the two options that I'm struggling with: Not use a static method and use a member method on the BlogPost entity. Have the BlogPost take an IDataService in the constructor and use dependency injection to resolve the BlogPost instance and the IDataService implementation. Don't use the entity to call the IDataService. Put the IDataService in the constructor of the ViewModel and use my container to resolve the IDataService when the viewmodel is instantiated. So with option one the layers will look like this ViewModel(Presentation layer) - Entity (Domain layer) - IDataService (Service Layer) or ViewModel(Presentation layer) - IDataService (Service Layer)

    Read the article

  • Problems with data driven testing in MSTest

    - by severj3
    Hello, I am trying to get data driven testing to work in C# with MSTest/Selenium. Here is a sample of some of my code trying to set it up: [TestClass] public class NewTest { private ISelenium selenium; private StringBuilder verificationErrors; [DeploymentItem("GoogleTestData.xls")] [DataSource("System.Data.OleDb", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=GoogleTestData.xls;Persist Security Info=False;Extended Properties='Excel 8.0'", "TestSearches$", DataAccessMethod.Sequential)] [TestMethod] public void GoogleTest() { selenium = new DefaultSelenium("localhost", 4444, "*iehta", http://www.google.com); selenium.Start(); verificationErrors = new StringBuilder(); var searchingTerm = TestContext.DataRow["SearchingString"].ToString(); var expectedResult = TestContext.DataRow["ExpectedTextResults"].ToString(); Here's my error: Error 3 An object reference is required for the non-static field, method, or property 'Microsoft.VisualStudio.TestTools.UnitTesting.TestContext.DataRow.get' E:\Projects\SeleniumProject\SeleniumProject\MaverickTest.cs 32 33 SeleniumProject The error is underlining the "TestContext.DataRow" part of both statements. I've really been struggling with this one, thanks!

    Read the article

  • Applications on the Web/Cloud the way to go? over Desktop apps?

    - by jiewmeng
    i am currently a mainly web developer, but is quite attracted to the performance and great integration with the OS (eg. Windows 7, Jump Lists, Taskbar Thumbnails, etc) something like WPF/C# can provide to the user, improving workflow and productivity. privacy and performance seems like a major downside of web/cloud apps compared to desktop apps. applications on the cloud/web work on the go, increased popularity of smartphones/netbooks majority of users may not benefit as much from increased performance of desktop apps, eg. internet surfing, word processing, probably benefit more from decreased startup times, lower costs and data on the cloud desktop applications increased performance benefits power users like 3D rendering, HD video/photo editing, gamers (i wonder if such processing maybe offset to cloud processing) integration with OS increases productivity (maybe such features can be adapted to a web version? maybe with a local desktop app to work with Web App API) more control over privacy (maybe fixed by encryption?) local data access (esp. large files) guaranteed and fast (YouTube HD fast enough most of the time) work not affected by intermittent/slow/availability internet connections (i know this is changing tho) what do you think?

    Read the article

  • Implementing Domain Driven Design

    - by Steve Dunn
    Is anyone using the techniques from Domain Driven Design? I've recently read the Eric Evans book of the same name (well, most of it!) and would be interested to hear from anyone who's implemented all/some of it in a project (particularly in C#/C++) I've kept this question open ended as I'd like to see as many comments as possible, but I have a few questions in particular: 1 - Should value types be real 'value types' if the language supports it? e.g. a struct in C# 2- Is there any feature in C# that makes clearer the association between the language and the model (for instance, this is an entity, this is an aggregate etc.)

    Read the article

  • Beginning Game Programming-ADVICES!

    - by udsha
    I like to continue my future career on way that I am looking to choose from few more ways I would like to do. Computer Game Programming / Networking(Security) ...etc Then It is good to know the risks having no those fields and how to begin it as a game programmer! I want those kind of advices and guidance . Can Anyone show me the path ?

    Read the article

  • Domain-driven design with Zend

    - by mik
    This question is a continuation of my previous question here http://stackoverflow.com/questions/2122850/zend-models-architecture (big thanks to Bill Karwin). I've made some reading including this article http://weierophinney.net/matthew/archives/202-Model-Infrastructure.html and this question http://stackoverflow.com/questions/373054/how-to-properly-create-domain-using-zend-framework Now I understand, what domain driven design is. But examples are still very simple and poor. They are based on one table and one model. Now, my question is: do they use Domain Model Design in real-world PHP projects? I've been looking for some good documentation about this, but I haven't found anything good enough, that explains how to manage several tables and transfer them to Domain Objects. As long as I know, there is Hibernate library, that has this features in Java, but what should I use in PHP (Zend Framework)?

    Read the article

  • Which is better for quickly developing small utilities? AutoIt or AutoHotKey?

    - by Abhijeet Pathak
    Which is better for quickly developing small utilities? AutoIt or AutoHotKey or something else? I need to develop some small software for which I think using some professional suite like Visual Studio will be overkill. Most of the macro recording tools like AutoIt or AutoHotKey provide enough power to write decent application. Plus they are small and free. Which option will be good? Using one of these tools or using some other small/free compiler?

    Read the article

  • help on ejb stateless datagram and message driven beans

    - by Kemmal
    i have a client thats sending a message to the ejbserver using UDP, i want the server(stateless bean) to echo back this message to the client but i cant seem to do this. or can i implement the same logic by using JMS? please help and enlighten. this is just a test, in the end i want a midp to be sending the message to the ejb using datagrams. here is my code. @Stateless public class SessionFacadeBean implements SessionFacadeRemote { public SessionFacadeBean() { } public static void main(String[] args) { DatagramSocket aSocket = null; byte[] buffer = null; try { while(true) { DatagramPacket request = new DatagramPacket(buffer, buffer.length); aSocket.receive(request); DatagramPacket reply = new DatagramPacket(request.getData(), request.getLength(), request.getAddress(), request.getPort()); aSocket.send(reply); } } catch (SocketException e) { System.out.println("Socket: " + e.getMessage()); } catch (IOException e) { System.out.println("IO: " + e.getMessage()); } finally { if(aSocket != null) aSocket.close(); } } } and the client: public static void main(String[] args) { DatagramSocket aSocket = null; try { aSocket = new DatagramSocket(); byte [] m = "Test message!".getBytes(); InetAddress aHost = InetAddress.getByName("localhost"); int serverPort = 6789; DatagramPacket request = new DatagramPacket(m, m.length, aHost, serverPort); aSocket.send(request); byte[] buffer = new byte[1000]; DatagramPacket reply = new DatagramPacket(buffer, buffer.length); aSocket.receive(reply); System.out.println("Reply: " + new String(reply.getData())); } catch (SocketException e) { System.out.println("Socket: " + e.getMessage()); } catch (IOException e) { System.out.println("IO: " + e.getMessage()); } finally { if(aSocket != null) aSocket.close(); } } please help.

    Read the article

  • How to avoid having very large objects with Domain Driven Design

    - by Pablojim
    We are following Domain Driven Design for the implementation of a large website. However by putting the behaviour on the domain objects we are ending up with some very large classes. For example on our WebsiteUser object, we have many many methods - e.g. dealing with passwords, order history, refunds, customer segmentation. All of these methods are directly related to the user. Many of these methods delegate internally to other child object but this still results in some very large classes. I'm keen to avoid exposing lots of child objects e.g. user.getOrderHistory().getLatestOrder(). What other strategies can be used to avoid this problems?

    Read the article

  • Hosting images from unsecured servers (travelnow.com)

    - by i.am.not.aids
    Hi, My application needs to serve images hosted in travelnow.com (ie. this image) but the application only allow images hosted on a secured server (ie. https). What are my options? TravelNow's suggestion is as follows. How do I do this? Akamai image servers are not secure. Therefore you are unable to serve any of the image urls with a secure HTTPS URL. If you need to serve an image with HTTPS, you must temporarily save the image to your own secure server. This is suggested only for images to be saved as you use them or need them temporarily on the secure page. The hotel images file available from the Affiliate Center provides up to 1.5 million URLs at any time for all properties storing images in the Akamai system. It is not recommended or advised to store all files in advance on your own system since properties change and update images frequently. Although we are not responsible for the images each property stores on the Akamai system, YOU will be responsible for any customer issues arising from displaying outdated or saved image files on your own pages. Thanks! Adrian

    Read the article

  • Future of Programmers [closed]

    - by Brian Paul
    Possible Duplicate: Will programmers be around in a few years? I have a passion of web development, but have been wondering of late, what is the future of web programming, and just programming in general. I will give an example to illustrate this, companies now most of them buy/ are willing to spend more money to implement enterprise level products, coming from big companies, than hiring a programmer, because when you look at the long term,instead of paying this programmer, and being tied to his ideas and skills, better buy a product, which you are guaranteed high level functions and support. Therefore what will be the future to programmers?

    Read the article

  • Non-language-specific interview questions for a senior web developer

    - by Songo
    I came across a job posting for a senior web developer position. The posting said that the development will be done using Ruby on Rails, but no prior knowledge is required. I confirmed with a contact in that company that a PHP web developer can apply for it or even an ASP.Net developer. I also confirmed that the interview won't contain any questions specific to PHP or Ruby on Rails. Can anyone please provide a good list of questions for a senior web developer that isn't specific to a certain language? Note This question isn't a duplicate for similar posts asking for questions relating to PHP, .Net or Ruby. Also, I'm not looking for topics to learn as a web developer, but rather interesting questions for a technical interview given the former conditions.

    Read the article

  • When Programming will become deprecated [closed]

    - by Vibeeshan
    Possible Duplicate: Will programmers be around in a few years? According to the history of programming, with each new generation of software engineering it seems to become easier and easier. Machine Code - Assembly - Programming Languages - easier - more easier - etc. If this situation continues anyone will be able to program (even complex systems). Even now, most of the kids study programming at school (Pascal , VB, etc.). Will be there any jobs called software engineering in future (if everyone know to program). ....and.... What do you think about the future of software development?

    Read the article

  • What to do with database in dev/production phases of a website?

    - by TheLQ
    For a while now I've been keeping a website I'm developing in the standard dev/production phases. Its been pretty simple: Mercurial repo for dev, repo for production. Do work in dev, get approved, push to production. But now I'm trying to apply this process to a new website that has a database and am struggling on how to figure out a development strategy. What I didn't mention above is that I do all my work on my own repo, push it to dev, then later push it to production, so its 3 different servers. So how do I manage my database? The obvious solution of mysqldump every commit isn't going to happen, and a dump at the end of the day isn't all that helpful when you want to undo later one change that happened in the middle of the day. What is the best way to accomplish this?

    Read the article

  • SAP vs Other Technologies

    - by Bunny Rabbit
    I am a fresher just out of collge .Till now i have worked on java,Python,javascript,groovy,django,JS, JQuery and web application develop has been my only intrest. I have been working for an IT company for past three months and it involves working with an erp package SAP and i am working on ABAP. Coming from a world of ORM and languages like python ,SAP and database tables doen't excite me much. With all the development being happening around HTML 5 and android etc i feel quite left out and bored in SAP . can you guys suggest me a proper way forward ?

    Read the article

  • Advice: should I focus on PHP + MySQL, or split my time for more JS and CSS? [closed]

    - by fakaff
    I started learning web development about three months ago (in between working my regular job), and I'm finally starting to get some vague, distant notion of understanding. I find the server-side stuff the most interesting; though I've not gone anywhere near Apache quite yet, which I assume will be necessary at some point. As cool as toying around with visuals and UI is, programming and database stuff inspires me with new ideas and possibilities every minute (I've even bought, on a whim, a wonderfully dry bunch of books on database theory and relational algebra). And whatever CSS or Javascript tutorial I'm doing, it often feels like a distraction from the PHP/MySQL stuff I'd rather be playing with. For someone like me who's just starting out, which is the most advisable course of action? (in terms of being marketable as a programmer): To focus on PHP and SQL stuff exclusively, and only once I master those to diversify my skills. To first learn all three (PHP/MySQL, Javascript, CSS and design) and only once I'm fluent in all three focus on PHP and databases?

    Read the article

  • jQuery plugin for Event Driven Architecture?

    - by leeand00
    Are there any Event Driven Architecture jQuery plugins? Step 1: Subscribing The subscribers subscribe to the event handler in the middle, and pass in a callback method, as well as the name of the event they are listening for... i.e. The two green subscribers will be listening for p0 events. And the blue subscriber will be listening for p1 events. Step 2: The p0 event is fired by another component to the Event Handler A p0 event is fired to the Event Handler The event handler notifies it's subscribers of the event, calling the callback methods they specified when they subscribed in Step 1: Subscribing. Note that the blue subscriber is not notified because it was not listening for p0 events. Step 3: The p1 event is fired a component to the Event Handler The p1 event is fired by another component Just as before except that now the blue subscriber receives the event through its callback and the other two green subscribers do not receive the event. Images by leeand00, on Flickr I can't seem to find one, but my guess is that they just call it something else in Javascript/jquery Also is there a name for this pattern? Because it isn't just a basic publisher/subscriber, it has to be called something else I would think.

    Read the article

  • SEO on a Database Driven Website

    - by Ryan Giglio
    I have a question about a site I'm developing. It is a database driven directory site where people can make a profile and list themselves in one or many area codes and in one or many fields of work. When someone is looking for a person to hire, they enter one or more area codes to look in (or select them with checkboxes) and when the form submits, it saves these as a cookie so the site remembers what location you were searching in. You then narrow down your search by category and field (which are links) and get a listing of all the profiles that match your search. What I am concerned about is this: because a search engine can't type in or select area codes to search in, how is it going to find and index any of the profile pages? It doesn't allow the user to search for people without first selecting an area code, because there's no practical purpose to do so. There would also be no practical purpose from a user experience/usability standpoint of simply having a list of each area code as a link to the categories page, but as far as I know, isn't that the only way for search engines to see every person? How does a site like Facebook accomplish this? There isn't some sort of master directory with a link to ever single Facebook user's profile page, and yet they're often the #1 search result for a person's name.

    Read the article

  • Spring Test / JUnit problem - unable to load application context

    - by HDave
    I am using Spring for the first time and must be doing something wrong. I have a project with several Bean implementations and now I am trying to create a test class with Spring Test and JUnit. I am trying to use Spring Test to inject a customized bean into the test class. Here is my test-applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="............."> <bean id="MyUuidFactory" class="com.myapp.UuidFactory" scope="singleton" > <property name="typeIdentifier" value="CLS" /> </bean> <bean id="ThingyImplTest" class="com.myapp.ThingyImplTest" scope="singleton"> <property name="uuidFactory"> <idref local="MyUuidFactory" /> </property> </bean> </beans> The injection of MyUuidFactory instance goes along with the following code from within the test class: private UuidFactory uuidFactory; public void setUuidFactory(UuidFactory uuidFactory) { this.uuidFactory = uuidFactory; } However, when I go to run the test (in Eclipse or command line) I get the following error (stack trace omitted for brevity): Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyImplTest' defined in class path resource [test-applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'com.myapp.UuidFactory' for property 'uuidFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [com.myapp.UuidFactory] for property 'uuidFactory': no matching editors or conversion strategy found Funny thing is, the Eclipse/Spring XML editor shows errors of I misspell any of the types or idrefs. If I leave the bean in, but comment out the dependency injection, everything work until I get a NullPointerException while running the test...which makes sense.

    Read the article

  • The Agile Engineering Rules of Test Code

    - by Malcolm Anderson
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Lots of test code gets written, a lot of it is waste, some of it is well engineered waste.Companies hire Agile Engineering Coaches because agile engineering is easy to do wrong.Very easy.So here's a quick tool you can use for self coaching.It's what I call, "The Agile Engineering Rules of Test Code" and it's going to act as a sort of table of contents for some future posts.The Agile Engineering Rules of Test Code Malcolm Anderson   Test code is not throw away code Test code is production code   8 questions to determine the quality of your test code Does the test code have appropriate comments?Is the test code executed as part of the build?Every Time?Is the test code getting refactored?Does everyone use the same test code?Can the test code be described as “Well Maintained”?Can a bright six year old tell you why any particular test failed?Are the tests independent and infinitely repeatable?

    Read the article

  • Is unit testing or test-driven development worthwhile?

    - by Owen Johnson
    My team at work is moving to Scrum and other teams are starting to do test-driven development using unit tests and user acceptance tests. I like the UATs, but I'm not sold on unit testing for test-driven development or test-driven development in general. It seems like writing tests is extra work, gives people a crutch when they write the real code, and might not be effective very often. I understand how unit tests work and how to write them, but can anyone make the case that it's really a good idea and worth the effort and time? Also, is there anything that makes TDD especially good for Scrum?

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >