76 lines
3.2 KiB
C#
76 lines
3.2 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Data.SqlClient;
|
|||
|
|
using NUnit.Framework;
|
|||
|
|
using System.Data;
|
|||
|
|
|
|||
|
|
|
|||
|
|
namespace DatabaseUnitTesting
|
|||
|
|
{
|
|||
|
|
[TestFixture]
|
|||
|
|
public class CalculatedChannelsTests : TestSetups
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
// Notes:
|
|||
|
|
// Operation
|
|||
|
|
// SUM = 1,
|
|||
|
|
// AVERAGE = 2,
|
|||
|
|
// IRTRACC3D =3,
|
|||
|
|
// IRTRACC3D_ABDOMEN =4,
|
|||
|
|
// IRTRACC3D_LOWERTHORAX = 5
|
|||
|
|
|
|||
|
|
|
|||
|
|
// [Test]
|
|||
|
|
// ============================================================
|
|||
|
|
// DELETE CALCULATED CHANNEL
|
|||
|
|
// Call sp_CalculatedChannelsDelete with a known calculated channel
|
|||
|
|
// Verify Calculated channel no longer exists in dbo.CalculatedChannels table.
|
|||
|
|
// ============================================================
|
|||
|
|
|
|||
|
|
|
|||
|
|
// [Test]
|
|||
|
|
// =============================================================
|
|||
|
|
// GET CALCULATED CHANNEL
|
|||
|
|
// Start with a test setup that has a known number of calculated channels included. Call sp_CalculatedChannelsGet for test setup
|
|||
|
|
// Verify known calculated channels are returned
|
|||
|
|
// =============================================================
|
|||
|
|
|
|||
|
|
|
|||
|
|
//[Test]
|
|||
|
|
// ============================================================
|
|||
|
|
// INSERT CALCULATED CHANNEL: VERIFY FIELDS
|
|||
|
|
// Starting with a known populated test setup call sp_CalculatedChannelsUpdateInsert with parameters for a new valid
|
|||
|
|
// calculated channel and compare all fields.
|
|||
|
|
// Pass if all fields in dbo.CalculatedChannels table are entered.
|
|||
|
|
// ============================================================
|
|||
|
|
|
|||
|
|
//[Test]
|
|||
|
|
// ============================================================
|
|||
|
|
// INSERT CALCULATED CHANNEL: VERIFY ONLY ONE NEW ROW IS ADDED
|
|||
|
|
// Starting with a known populated test setup call sp_CalculatedChannelsUpdateInsert with parameters for a new valid
|
|||
|
|
// calculated channel and verify a new row is created in dbo.CalcualtedChannels table.
|
|||
|
|
//
|
|||
|
|
// ============================================================
|
|||
|
|
|
|||
|
|
|
|||
|
|
//[Test]
|
|||
|
|
// ============================================================
|
|||
|
|
// UPDATE CALCULATED CHANNEL
|
|||
|
|
// Send valid calculated channels parameters to sp_CalculatedChannelsInUpdateInsert for a calculated
|
|||
|
|
// channel that already is in the database and compare all fields.
|
|||
|
|
// Pass if all fields in dbo.CalculatedChannels table are entered.
|
|||
|
|
// ============================================================
|
|||
|
|
|
|||
|
|
|
|||
|
|
//[Test]
|
|||
|
|
// ============================================================
|
|||
|
|
// UPDATE CALCULATED CHANNEL: VERIFY NO NEW ROW IS ADDED
|
|||
|
|
// Send valid calculated channels parameters to sp_CalculatedChannelsInUpdateInsert for a calculated
|
|||
|
|
// channel that already is in the database and verify no new row is created in dbo.CalculatedChannels table.
|
|||
|
|
//
|
|||
|
|
// ============================================================
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|