Skip to content

Commit 1edc978

Browse files
committed
misplaced test
1 parent d3f2a41 commit 1edc978

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

QueryBuilder.Tests/InsertTests.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
1-
using SqlKata.Compilers;
1+
using System;
2+
using SqlKata.Compilers;
23
using SqlKata.Tests.Infrastructure;
34
using Xunit;
45

56
namespace SqlKata.Tests
67
{
78
public class InsertTests : TestSupport
89
{
10+
[Fact]
11+
public void InsertObject()
12+
{
13+
var query = new Query("Table").AsInsert(new
14+
{
15+
Name = "The User",
16+
Age = new DateTime(2018, 1, 1),
17+
});
18+
19+
var c = Compile(query);
20+
21+
Assert.Equal("INSERT INTO [Table] ([Name], [Age]) VALUES ('The User', '2018-01-01')", c[EngineCodes.SqlServer]);
22+
23+
24+
Assert.Equal("INSERT INTO \"TABLE\" (\"NAME\", \"AGE\") VALUES ('The User', '2018-01-01')", c[EngineCodes.Firebird]);
25+
}
26+
927
[Fact]
1028
public void InsertFromSubQueryWithCte()
1129
{

QueryBuilder.Tests/UpdateTests.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,6 @@ namespace SqlKata.Tests
88
{
99
public class UpdateTests : TestSupport
1010
{
11-
[Fact]
12-
public void InsertObject()
13-
{
14-
var query = new Query("Table").AsInsert(new
15-
{
16-
Name = "The User",
17-
Age = new DateTime(2018, 1, 1),
18-
});
19-
20-
var c = Compile(query);
21-
22-
Assert.Equal("INSERT INTO [Table] ([Name], [Age]) VALUES ('The User', '2018-01-01')", c[EngineCodes.SqlServer]);
23-
24-
25-
Assert.Equal("INSERT INTO \"TABLE\" (\"NAME\", \"AGE\") VALUES ('The User', '2018-01-01')", c[EngineCodes.Firebird]);
26-
}
27-
2811
[Fact]
2912
public void UpdateObject()
3013
{

0 commit comments

Comments
 (0)