-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements the ToString() method for the object model.
- Loading branch information
1 parent
95a5302
commit 66d3e90
Showing
28 changed files
with
427 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlCheckConstraintTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlCheckConstraintTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlCheckConstraintTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var checkConstraint = new SqlCheckConstraint() | ||
{ | ||
Name = "The name", | ||
Code = default, | ||
}; | ||
|
||
checkConstraint.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlColumnTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlColumnTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlColumnTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var column = new SqlColumn() | ||
{ | ||
Name = "The name", | ||
CollationName = default, | ||
ComputedExpression = default, | ||
IsComputed = default, | ||
IsIdentity = default, | ||
IsNullable = default, | ||
MaxLength = default, | ||
Position = default, | ||
Precision = default, | ||
Scale = default, | ||
SystemTypeId = default, | ||
TypeName = default, | ||
}; | ||
|
||
column.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlForeignKeyColumnTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlForeignKeyColumnTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlForeignKeyColumnTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var column = new SqlForeignKeyColumn() | ||
{ | ||
Name = "The name", | ||
Referenced = "The referenced", | ||
Position = default, | ||
}; | ||
|
||
column.ToString().Should().Be("The name => The referenced"); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlForeignKeyTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlForeignKeyTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlForeignKeyTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var foreignKey = new SqlForeignKey([]) | ||
{ | ||
DeleteAction = default, | ||
ReferencedTable = default, | ||
UpdateAction = default, | ||
Name = "The name", | ||
}; | ||
|
||
foreignKey.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlIndexColumnTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlIndexColumnTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlIndexColumnTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var column = new SqlIndexColumn() | ||
{ | ||
Name = "The name", | ||
Position = default, | ||
}; | ||
|
||
column.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlIndexTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlIndexTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlIndexTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var index = new SqlIndex(Array.Empty<SqlIndexColumn>(), Array.Empty<SqlIndexColumn>()) | ||
{ | ||
Filter = null, | ||
IsUnique = default, | ||
Name = "The name", | ||
Type = default, | ||
}; | ||
|
||
index.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlPrimaryKeyColumnTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlPrimaryKeyColumnTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlPrimaryKeyColumnTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var column = new SqlPrimaryKeyColumn() | ||
{ | ||
Name = "The name", | ||
Position = default, | ||
}; | ||
|
||
column.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
tests/UnitTests.Databases.SqlServer.Tests/ObjectModel/SqlPrimaryKeyTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//----------------------------------------------------------------------- | ||
// <copyright file="SqlPrimaryKeyTest.cs" company="P.O.S Informatique"> | ||
// Copyright (c) P.O.S Informatique. All rights reserved. | ||
// </copyright> | ||
//----------------------------------------------------------------------- | ||
|
||
namespace PosInformatique.UnitTests.Databases.Tests | ||
{ | ||
public class SqlPrimaryKeyTest | ||
{ | ||
[Fact] | ||
public void ToStringTest() | ||
{ | ||
var primaryKey = new SqlPrimaryKey([]) | ||
{ | ||
Name = "The name", | ||
Type = default, | ||
}; | ||
|
||
primaryKey.ToString().Should().Be("The name"); | ||
} | ||
} | ||
} |
Oops, something went wrong.