public void NullQueryOrStoredProc_Throws_ArgumentNullException()
        {
            var    sqlDataAccessor = new SqlDataAccessor(ConfigurationManager.AppSettings["DBConnection"]);
            Action act             = () => sqlDataAccessor.RetrieveSingleDomainObjectFromDatabase <object>(null);

            act.ShouldThrow <ArgumentNullException>();
        }
        public void SqlDataAccessor_Returns_ExpectedSingleObject_From_Database()
        {
            var connectionString = ConfigurationManager.AppSettings["DBConnection"];
            var sqlDataAccessor  = new SqlDataAccessor(connectionString);

            Employee employee = sqlDataAccessor.RetrieveSingleDomainObjectFromDatabase <Employee>(
                "dbo.GetAllEmployeeWithId",
                new Dictionary <string, object>()
            {
                { "@Id", "EMP1" }
            });

            employee.Should().NotBeNull("because we know the employee exists");
        }
        [Ignore]         // Does not work yet
        public void SqlDataAccessor_Returns_ExpectedSingleObject_From_Database_WithTextCommand()
        {
            var connectionString = ConfigurationManager.AppSettings["DBConnection"];
            var sqlDataAccessor  = new SqlDataAccessor(connectionString);

            Employee employee = sqlDataAccessor.RetrieveSingleDomainObjectFromDatabase <Employee>(
                "SELECT EmployeeId, FirstName ,LastName ,DateOfJoining FROM dbo.Employees WHERE EmployeeId = @Id AND FirstName = @FName",
                new Dictionary <string, object>()
            {
                { "@Id", "EMP1" },
                { "@FName", "John" }
            });

            employee.Should().NotBeNull("because we know the employee exists");
        }