Browse by Tags

All Tags » Iterative Development - Testing (RSS)
I created two tests to test the common types of progression; the first will use date/time comparisons, where the next one will use numerical comparisons. The first is in the case of calculating a reoccurring task, where the other option is for calculating...
Posted by bmains | with no comments
I tested this method to be sure that it would work: [Test()] public void TestLoadingAndSavingFile() { TaskCollection collection = new TaskCollection(); Task task = new Task("Wash Car", "Auto"); task.Attributes.Add(new MetadataAttribute...
I found a bug with the MetadataAttribute; it seems no matter what, the value is coming back as a string. This is because I return the type from the value. I notice this problem with the loading/saving portion, and as such, I want to do this instead: public...
Conceptually, I thought about the serialization process, and how I used the XmlSerializer object to serialize my objects into XML previously. However, this wouldn't work because of how the attributes work in the collection; at least, from what I know...
Figuring out what to test can be hard to determine. I created this following test: [Test()] public void TestWriteXML() { XmlDocument doc = new XmlDocument(); doc.LoadXml("<TestRoot><TestElement>Test Item</TestElement></TestRoot>"...
Posted by bmains | with no comments
For this, we need to determine about the minimum characteristics of file IO capabilities. Whenever you open a streamreader or streamwriter object, you must ensure the object is disposed, and so using is a nice keyword to use for this. An example of using...
Posted by bmains | with no comments
I wanted to ensure the central access to the tasks would work. In my other blog, I talked about centralized access in a windows application, where the root object could be accessible through the entire application. I created the following class: namespace...
I had a situation where I had to use int.TryParse. A field in the form that I will show later uses this method to convert a string value to integer. I want to ensure that the value is correct. set { int intValue = 0; //If not an integer value, throw an...
I refactored the previous MetadataEntry name to MetadataElement because it didn't seemingly make sense. I probably should have left it go, and did a refactor later (after all, the tools have the ability to handle this kind of change); however, I chose...
Posted by bmains | with no comments
I found one of the problems with sorting; I didn't calculate desending sorting. For instance, the integer values -1, 0, 1 tell you whether the first value is less than the second value, the same, or opposite. However, in descending order, you have...
Posted by bmains | with no comments
There were a few problem tests; the first was with inserting a range, which I'm not quite sure what the problem is. I'm getting an IndexOutOfRangeException for the InsertRange statement. I'm using an index value of one, which should be a valid...
Posted by bmains | with no comments
Metadata attribute testing was mostly a success; there were only a few slight problems. In looking at the tests, I created a method to create a common setup for the root Entity object: public MetadataEntry InitializeTest() { MetadataEntry testEntry =...
Posted by bmains | with no comments
It was when it came to the remove test that I was experiencing problems, a problem that shut down NUnit altogether. The test was as below. public void TestRemoveTasks() { _tasks = new CollectionBase<TaskTest>(); TaskTest task = new TaskTest("A"...
Posted by bmains | with no comments
In testing the collection capabilities, in order to further understand and test the collections, I created a series of tests to implement. These tests work with the add, insert, remove, etc methods of collections, as well as other important features....
Posted by bmains | with no comments
Mostly, in the scenarios that I am looking at, is the idea of how date processing works. So my series of initial tests revolved around that. I created a test task class which stores the basic properties that will be used in this class. Tasks can be one...