30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
namespace LaaProductionWeb.UnitTests.Data
|
|
{
|
|
using LaaProductionWeb.Data;
|
|
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
[TestClass]
|
|
public class FluentSQLTestClass
|
|
{
|
|
[TestMethod]
|
|
public void Constructor_ShouldThrow_ConnectionString_IsNull()
|
|
=> Assert.ThrowsException<ArgumentException>(() => new FluentSQL(null));
|
|
|
|
[TestMethod]
|
|
public void Constructor_ShouldThrow_ConnectionString_IsWhiteSpace()
|
|
=> Assert.ThrowsException<ArgumentException>(() => new FluentSQL(string.Empty));
|
|
|
|
[TestMethod]
|
|
public void Constructor_ShouldThrow_ConnectionString_KeyNotFound()
|
|
=> Assert.ThrowsException<ArgumentException>(() => new FluentSQL("invalid connection string"));
|
|
|
|
[TestMethod]
|
|
public void Constructor_ShouldThrow_ConnectionString_NotWellFormed()
|
|
=> Assert.ThrowsException<ArgumentException>(() => new FluentSQL("Invalid Key=123"));
|
|
}
|
|
}
|