Thursday, February 3, 2011

Information about NUNIT

The NUNIT is a testing tool which is used to test your buisness logic.

1. Some of the buisness logic can be Insert, Update, IsProjectExists or IsRequirementExists.

2. The NUNIT contains the app.config for accessing the buissness and the test rules for testing the buisness logic.

3. Some of the tags which is used are

3.1 [TestFixtureSetUp] - To generate all the values needed for testing.

3.2 [SetUp] - Used to initialize the values.

3.4 [TearDown] - Every class should have a CleanUp which is empty.

3.5 [Test] - The function which is going to be tested should have this tag.

3.6 [TestFixtureTearDown] - Used to deallocate the resource.

Note: The items present in 3 is mandatory to run a test of NUNIT.

4. The NUNIT usually executes the function in the alphabetical order.

5. Assert - itz usually class used to test the values. some of them are AreEqual, AreNotEqual etc.

to know more about this you can email me..




Wednesday, February 2, 2011

Updating Sequence Records for each category using Join

Input:
Id ReqId ProjectId
1 NULL 1
2 NULL 1
3 NULL 2
4 NULL 2
5 NULL 2
6 NULL 3
7 NULL 3
8 NULL 3
9 NULL 3
10 NULL 4
11 NULL 4

Output
Id ReqId ProjectId
1 1 1
2 2 1
3 1 2
4 2 2
5 3 2
6 1 3
7 2 3
8 3 3
9 4 3
10 1 4
11 2 4

;
with cteSequence
as
(
select r.Id,ProjectId,r.DateCreated,row_number() over (partition by ProjectId order by r.DateCreated) as SequenceNo
from Projects p
inner join
Requirements r
ON
p.Id = r.ProjectId
)

UPDATE
Requirements
SET Requirements.RequirementId = s.SequenceNo
FROM
Requirements r
INNER JOIN
cteSequence s
ON r.Id = s.Id

Select ProjectID,ID,RequirementId from Requirements Order By ProjectID,RequirementId,Id

Monday, January 31, 2011

Basecamp API

What is Basecamp:
The basecamp API is project management tool where the project can be created along with the related documents can also be posted. The comments can also be posted for the particular project.

What is Basecamp API:
The Basecamp API is implemented as vanilla XML over HTTP using all four verbs (GET/POST/PUT/DELETE). Every resource, like Post, Comment, or TodoList, has their own URL and are manipulated in isolation.

For reference:

My Experience
I have used the Basecamp API in one of my project named http://www.sluiceit.com/ which is a requirement management tool for projects, the sluiceit will integrate the Basecamp with the help of the basecamp API  the completed projects is exported to the existing project or with the help of the new project in the basecamp with the help of the API token. The completed requirments are transferred to the basecamp in the form of message along with their corresponding documents as well.
In the sluiceit.com only the clientAdmin and the projectAdmin have the rights to export the project into the basecamp.
For more information on how it is designed in the sluiceit.com, and the samples related to how to upload a document, create a message, todolist, milestones. You can e-mail me to gmail .

Parsing the Querystring using Regular Expression

public static string GetParamValue(string query,string parameter)
{
string value = string.Empty;
Match match = Regex.Match(query, "[?&]" + parameter + "(?:=([^&]*))?", RegexOptions.IgnoreCase RegexOptions.Singleline);
if (match.Success)
value = match.Groups[1].Value;
return value;
}