Here's a simple test you can give candidates.
You can download the same project here: DotNetTest.zip (13.94 kb)
.Net Test
Purpose: Evaluate candidate’s
familiarity with OO Design and implementation.
Database
- Create a table in the database
(connection string in Web.Config) Called Emails
- Emails table should have 4
columns. First column is called ID it’s a primary key with identity
insert turned on.
- Other three columns should be
called Email, Name, HasError has error should be of type bit.
- Put the SQL create table script
into the App_Data folder
- Create a stored procedure that
accepts three parameters Email,Name,HasError
- Using dynamic SQL within the
stored procedure insert the record into the database.
Business Logic
- Implement
ASM.Web.Business.Emailer.Insert should iterate through collection
inserting records into the database via stored procedure implemented in
Data section.
- Implement ASM.Web.Common.Email both shared Sub. This logic
should email and call Emailer.Insert.
User Interface
- Create a web form.
- Put two text boxes on the page.
One called Email the other name.
- Place two buttons on the page once
called “Send Once” the other “Send 5 Times”
- Using javascript create
validation that forces the user to enter text into both fields and alerts
the user to enter in text use this when someone clicks on either buttons.
- Add a Custom Validator control
to ensure the user enters a valid email address.
- When you click the Send Once
button it should implement ASM.Web.Common.SendEmail using Business.Email
Class
- When you click the Send 5 Times
email it should implement the ASM.Web.Common.SendEmail using the
Business.EmailCollection Class
Result:
When you click the Send Once button it send one email and
insert one record into the Emails table.
When you click the Send 5 Times button it should send 5
emails and insert 5 records into the Emails table.