|
Hi All,
I’m looking for a good Unit tester that can test both the UI and the business object models. We are using the DevExpress expressApps framework.
I am aware of NUnit, MBunit, XUnit and TestDriven.net but I’m not sure what ties in the best with DevExpress.
Thanks,
|
|
|
|
|
Have you tried asking at the devexpress forums?
Kevin
|
|
|
|
|
Yes I have and no one has a single solution. Most of them are using a mixture of different unit testing software.
|
|
|
|
|
I use devExress controls and tested it using NUnit. You need to implement some pattern like MVP/MVC and make your views humble. So you can test it easily. It's a huge topic and reading this[^] blog will give you some ideas. Just read his CAB series. It's worth reading.
|
|
|
|
|
Hello,
You can use any unit tester with DevExpress, because they are not specific to any developer tool by design. We even have our own Unit test runner tool[^]
Many of us are using it internally.
As for testing eXpressApp Framework applications, I suggest you have a look at our own functional testing framework - EasyTest[^].
It was specially designed to test XAF applications and we have been successfull using it to test XAF releases internally for more than 6 years. BTW, EasyTest also can be used to test regular non-XAF applications build using DevExpress components.
Please contact our Support Team[^] in case of any questions.
Finally, I suggest you look at the Best practices of creating reusable XAF modules by example of a View Variants module extension[^] blog I recently wrote. You may be interested in it, because it also demonstrates how EasyTest can save you a lot of time.
Thanks,
Dennis
DevExpress Support, R&D, .NET Application Frameworks
|
|
|
|
|
Hi,
How can I pull out the values x, y and z in the below xml string?
"<Type><stringList xmlns=\"http://schemas.company.com/location/[app]/stringList/1.0\"><value>x</value><value>y</value><value>z</value></stringList></Type>"
|
|
|
|
|
Hi,
You could use regular expressions. Or create a XMLDocument-Object and then search for the nodes (traverse the document or use xpath).
|
|
|
|
|
yes, I should have said that I am aware that I can use xmlDocument but not sure how to loop to find <value> nodes.
|
|
|
|
|
Use the SelectNodes method.
|
|
|
|
|
Also, be aware that you have a namespace defined here, so you'll need to take that into account when performing the SelectNodes call.
|
|
|
|
|
Put the string in an XmlDocument, and use .DocumentElement.FirstChild.ChildNodes to get a list with the three value nodes.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
This seems to be working:
foreach (XmlNode valueNode in doc.ChildNodes[0].ChildNodes[0].ChildNodes)
{
}
Thank you all.
|
|
|
|
|
You should be able to use FirstChild instead of ChildNodes[0] .
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How do I change my existing code to firstchild?
foreach (XmlNode valueNode in doc.ChildNodes[0].ChildNodes[0].ChildNodes)
{
}
Thanks
|
|
|
|
|
arkiboys wrote: How do I change my existing code to firstchild?
foreach (XmlNode valueNode in doc.ChildNodes[0].ChildNodes[0].ChildNodes)
Exactly as I showed you before:
foreach (XmlNode valueNode in doc.DocumentElement.FirstChild.ChildNodes)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
Hi Everyone
I have created a Parent from and a child form. I have a calendar on the Parent form and a schedule on the child form. When i click on a date it will open the schedule form inside the parent form.I want it to create a tab when it opens.
Does any one know how to do this?
Thanks in advance
|
|
|
|
|
I would like to replace the word "Computer Box" to "Computer System" in any sentence i.e. strSentence
string strSentence = "I have a Computer Box";
The string above could be = "I have a computer boc";
Notice the upper case "C" and "b" in computer.
So no matter what the case is in the word, I would like to replace just that word and nothing else in the sentence should change their existing case.
Input:
string strSentence = "I have a Computer Box";
Result:
strSentence = "I have a Computer System"
///////////////////////////
Input:
string strSentence = "I have a computer box";
Result:
strSentence = "I have a Computer System"
This does not seem to be the solution:
strSentence = strSentence.Replace("Computer Box", "Computer System")
The above code works if the case matches, but what if the word is written as "computer box"?
How can the above replace be altere to cater for any case.
Please note that I even tried ToLower(), but that changes everything in the sentence to lower which is not what I want.
Any thoughts please?
Thanks
|
|
|
|
|
There are several ways to do this. You could use regular expressions, or iterate over the string manually searching using IndexOf, etc.
There is an article on CP that lists the possible options, and presents a faster manual technique:
http://www.codeproject.com/KB/string/fastestcscaseinsstringrep.aspx[^]
I suggest you read it, and the comments as some extra discussion of possible options has gone on there.
Simon
|
|
|
|
|
using System.Text.RegularExpressions;
string myString = "I have a computer box";
string strReplace = "Computer System";
myString = Regex.Replace(myString, "computer box", strReplace, RegexOptions.IgnoreCase);
|
|
|
|
|
Solved.
Thanks
modified on Thursday, October 30, 2008 10:58 AM
|
|
|
|
|
Something like this would do the trick.
String oldString = "I have a Computer Box on my desk";
String searchTerm = "computer box";
String replacement = "Computer System";
int idx = oldString.IndexOf(searchTerm, StringComparison.CurrentCultureIgnoreCase);
if (idx != -1) {
String frontEnd = oldString.Substring(0, idx);
String backEnd = oldString.Substring(idx + searchTerm.Length);
String newString = frontEnd + replacement + backEnd;
Console.WriteLine(oldString);
Console.WriteLine(newString);
} else {
Console.WriteLine("Search term not found: {0}", searchTerm);
}
Alan.
|
|
|
|
|
I want to store raw data in an array:
byte[] byteArray = new byte[]{0x00,0x01,0x02};
This works, but it is space-inefficient because every byte will consume five bytes of harddisk space. Can I somehow make every byte only consume one byte of harddisk space?
|
|
|
|
|
What makes you think every byte will consume 5 bytes of space?
There will be some overhead for the array object, but beyond that a byte is a byte.
Simon
|
|
|
|
|
Thanks for your post. Please note that it is the size of the .cs file I want to reduce, not the .exe file.
|
|
|
|