diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml
index cc3f773ce2..3d2825984a 100644
--- a/.github/workflows/create_release.yml
+++ b/.github/workflows/create_release.yml
@@ -14,7 +14,7 @@ jobs:
version: ${{ steps.release_info.outputs.version }}
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Release Info
@@ -39,7 +39,7 @@ jobs:
#Prepend patch notes with backticks
sed -i '1s/^/```\n/' patch_notes.txt
- name: Upload
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: release_info
path: |
@@ -56,9 +56,9 @@ jobs:
OUTPUT_FILE_NAME: DOLServer_${{ matrix.build_target }}.zip
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup Dotnet
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup MinGW-w64
@@ -87,8 +87,8 @@ jobs:
cp libdol_detour.dll ../../../${{ matrix.build_target }}/dol_detour.dll
- name: Test Build
run: |
- dotnet test --verbosity normal --filter "DOL.UnitTests&TestCategory!=Explicit" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
- dotnet test --verbosity normal --filter "DOL.Integration&TestCategory!=Explicit" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
+ dotnet test --verbosity normal --filter "DOL.UnitTests" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
+ dotnet test --verbosity normal --filter "DOL.Integration" ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll
- name: Add DOLConfig
if: ${{ github.repository_owner == 'Dawn-of-Light' }}
run: |
@@ -112,7 +112,7 @@ jobs:
run: |
(cd ${{ matrix.build_target }}/ && zip -r ../${{ env.OUTPUT_FILE_NAME }} * )
- name: Upload Build Output
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: build_artifacts
path: ${{ env.OUTPUT_FILE_NAME }}
@@ -123,9 +123,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Download artifacts
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
- name: Create Release
run: |
set -x
diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml
index 501d13c3f3..99f8a6d83b 100644
--- a/.github/workflows/docker_build_push.yml
+++ b/.github/workflows/docker_build_push.yml
@@ -20,18 +20,18 @@ jobs:
run: |
echo "date=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Set up QEMU for Docker
- uses: docker/setup-qemu-action@v2
+ uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
+ uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v5
with:
context: .github/Docker
target: release_dotnet
@@ -44,7 +44,7 @@ jobs:
push: true
tags: dawnoflight/dolsharp:latest
- name: Build and push Sandbox
- uses: docker/build-push-action@v4
+ uses: docker/build-push-action@v5
with:
context: .github/Docker
target: release_sandbox_dotnet
diff --git a/.github/workflows/test_netcore_linux.yml b/.github/workflows/test_netcore_linux.yml
index 74be19a9fa..ca1370a7f9 100644
--- a/.github/workflows/test_netcore_linux.yml
+++ b/.github/workflows/test_netcore_linux.yml
@@ -13,15 +13,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup Dotnet
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: '6.0.x'
+ dotnet-version: '8.0.x'
- name: Build
run: |
dotnet build -c ${{ matrix.build_target }} "Tests/Tests.csproj" --verbosity normal
- name: Test
run: |
- dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.UnitTests&TestCategory!=Explicit"
- dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.Integration&TestCategory!=Explicit"
+ dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.UnitTests"
+ dotnet test ./build/Tests/${{ matrix.build_target }}/lib/Tests.dll -v n --filter "DOL.Integration"
diff --git a/.github/workflows/test_netcore_windows.yml b/.github/workflows/test_netcore_windows.yml
index f042b6c629..3620cc6a61 100644
--- a/.github/workflows/test_netcore_windows.yml
+++ b/.github/workflows/test_netcore_windows.yml
@@ -13,15 +13,15 @@ jobs:
runs-on: windows-2019
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Setup Dotnet
- uses: actions/setup-dotnet@v3
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: '6.0.x'
+ dotnet-version: '8.0.x'
- name: Build
run: |
dotnet build -c ${{ matrix.build_target }} "Tests\Tests.csproj" --verbosity normal
- name: Test
run: |
- dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.UnitTests&TestCategory!=Explicit"
- dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.Integration&TestCategory!=Explicit"
+ dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.UnitTests"
+ dotnet test .\build\Tests\${{ matrix.build_target }}\lib\Tests.dll -v n --filter "DOL.Integration"
diff --git a/DOLBase/DOLBase.csproj b/DOLBase/DOLBase.csproj
index 8f73acbe92..6d386c1930 100644
--- a/DOLBase/DOLBase.csproj
+++ b/DOLBase/DOLBase.csproj
@@ -38,7 +38,7 @@
-
+
diff --git a/DOLDatabase/DOLDatabase.csproj b/DOLDatabase/DOLDatabase.csproj
index 270c55cb5a..2331269365 100644
--- a/DOLDatabase/DOLDatabase.csproj
+++ b/DOLDatabase/DOLDatabase.csproj
@@ -39,8 +39,8 @@
-
-
+
+
diff --git a/DOLServer/DOLServer.csproj b/DOLServer/DOLServer.csproj
index 2fb4475e5e..92176312d3 100644
--- a/DOLServer/DOLServer.csproj
+++ b/DOLServer/DOLServer.csproj
@@ -4,7 +4,7 @@
- net6.0
+ net8.0
Exe
Debug
AnyCPU
@@ -45,7 +45,7 @@
False
-
+
diff --git a/GameServer/GameServer.csproj b/GameServer/GameServer.csproj
index 4c2a55a2a2..91ccb7ab5b 100644
--- a/GameServer/GameServer.csproj
+++ b/GameServer/GameServer.csproj
@@ -4,7 +4,7 @@
- net6.0
+ net8.0
Debug
AnyCPU
GameServer
@@ -38,9 +38,9 @@
-
-
-
+
+
+
diff --git a/GameServer/gameutils/DOLScriptCompiler.cs b/GameServer/gameutils/DOLScriptCompiler.cs
index cf013a729a..2e0c9cf308 100644
--- a/GameServer/gameutils/DOLScriptCompiler.cs
+++ b/GameServer/gameutils/DOLScriptCompiler.cs
@@ -135,8 +135,7 @@ private static void LoadDefaultAssemblies()
.Where(s => !string.IsNullOrEmpty(s))
.Select(s => MetadataReference.CreateFromFile(s));
var additionalReferences = new string[] {
- "System.Security.Cryptography.Algorithms", //for SHA256 in AutoXMLDatabaseUpdate
- "System.Security.Cryptography.Primitives", //for SHA256 in AutoXMLDatabaseUpdate
+ "System.Security.Cryptography", //for SHA256 in AutoXMLDatabaseUpdate
"System.Net.Http"
}.Union(GameServer.Instance.Configuration.AdditionalScriptAssemblies)
.Select(r => GetPortableExecutableReference(r));
diff --git a/GameServerScripts/GameServerScripts.csproj b/GameServerScripts/GameServerScripts.csproj
index e9de8a90c6..b614a408bd 100644
--- a/GameServerScripts/GameServerScripts.csproj
+++ b/GameServerScripts/GameServerScripts.csproj
@@ -4,7 +4,7 @@
- net6.0
+ net8.0
Debug
AnyCPU
Library
diff --git a/GameServerScripts/dbupdater/LanguageSystemUpdate.cs b/GameServerScripts/dbupdater/LanguageSystemUpdate.cs
index 7259393e49..cd93eac64e 100644
--- a/GameServerScripts/dbupdater/LanguageSystemUpdate.cs
+++ b/GameServerScripts/dbupdater/LanguageSystemUpdate.cs
@@ -29,7 +29,7 @@ namespace DOL.GS.DatabaseUpdate
public class LanguageSystemUpdate : IDatabaseUpdater
{
#region DBLanguage table structure
- private class language : DataObject
+ private class Language : DataObject
{
protected string m_translationid;
protected string m_EN = "";
@@ -39,7 +39,7 @@ private class language : DataObject
protected string m_CU = "";
protected string m_packageID;
- public language() { }
+ public Language() { }
[DataElement(AllowDbNull = false, Unique = true)]
public string TranslationID
@@ -103,12 +103,12 @@ public void Update()
if (GameServer.Database.GetObjectCount() < 1 && ServerProperties.Properties.USE_DBLANGUAGE)
{
- var objs = GameServer.Database.SelectAllObjects();
+ var objs = GameServer.Database.SelectAllObjects();
if (objs.Count > 0)
{
List lngObjs = new List();
- foreach (language obj in objs)
+ foreach (Language obj in objs)
{
if (Util.IsEmpty(obj.TranslationID))
continue;
diff --git a/GameServerScripts/quests/Albion/ChildsPlay.cs b/GameServerScripts/quests/Albion/ChildsPlay.cs
index f66adadb6b..7f377c464a 100644
--- a/GameServerScripts/quests/Albion/ChildsPlay.cs
+++ b/GameServerScripts/quests/Albion/ChildsPlay.cs
@@ -46,7 +46,7 @@
namespace DOL.GS.Quests.Albion
{
- public class childsplay : BaseQuest
+ public class ChildsPlay : BaseQuest
{
///
/// Defines a logger for this class.
@@ -82,22 +82,22 @@ public class childsplay : BaseQuest
private static IArea Albion_Statue_Area = null;
- public childsplay()
+ public ChildsPlay()
: base()
{
}
- public childsplay(GamePlayer questingPlayer)
+ public ChildsPlay(GamePlayer questingPlayer)
: this(questingPlayer, 1)
{
}
- public childsplay(GamePlayer questingPlayer, int step)
+ public ChildsPlay(GamePlayer questingPlayer, int step)
: base(questingPlayer, step)
{
}
- public childsplay(GamePlayer questingPlayer, DBQuest dbQuest)
+ public ChildsPlay(GamePlayer questingPlayer, DBQuest dbQuest)
: base(questingPlayer, dbQuest)
{
}
@@ -1482,7 +1482,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.AddHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.AddHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
- Charles.AddQuestToGive(typeof(childsplay));
+ Charles.AddQuestToGive(typeof(ChildsPlay));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
@@ -1502,7 +1502,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
- Charles.RemoveQuestToGive(typeof(childsplay));
+ Charles.RemoveQuestToGive(typeof(ChildsPlay));
}
protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
@@ -1511,10 +1511,10 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
if (player == null)
return;
- if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
+ if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
Charles.TurnTo(player);
@@ -1581,7 +1581,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText2"))
{
Charles.SayTo(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text5"));
- player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(childsplay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
+ player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(ChildsPlay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
}
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText3"))
{
@@ -1596,7 +1596,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
/// true if qualified, false if not
public override bool CheckQuestQualification(GamePlayer player)
{
- if (player.IsDoingQuest(typeof(childsplay)) != null)
+ if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return true;
if (player.Level < minimumLevel || player.Level > maximumLevel)
@@ -1607,7 +1607,7 @@ public override bool CheckQuestQualification(GamePlayer player)
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
if (quest == null)
return;
@@ -1629,7 +1629,7 @@ protected static void SubscribeQuest(DOLEvent e, object sender, EventArgs args)
if (qargs == null)
return;
- if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(childsplay)))
+ if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(ChildsPlay)))
return;
if (e == GamePlayerEvent.AcceptQuest)
@@ -1642,7 +1642,7 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
{
AreaEventArgs aargs = args as AreaEventArgs;
GamePlayer player = aargs.GameObject as GamePlayer;
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
if (quest != null && quest.Step == 1)
{
@@ -1653,10 +1653,10 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
- if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
+ if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;
- if (player.IsDoingQuest(typeof(childsplay)) != null)
+ if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return;
if (response == 0x00)
@@ -1665,7 +1665,7 @@ private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
}
else
{
- if (!Charles.GiveQuest(typeof(childsplay), player, 1))
+ if (!Charles.GiveQuest(typeof(ChildsPlay), player, 1))
return;
SendReply(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAcceptQuest.Text2"));
}
diff --git a/GameServerScripts/quests/Hibernia/ChildsPlay.cs b/GameServerScripts/quests/Hibernia/ChildsPlay.cs
index 967908d13f..e762534792 100644
--- a/GameServerScripts/quests/Hibernia/ChildsPlay.cs
+++ b/GameServerScripts/quests/Hibernia/ChildsPlay.cs
@@ -46,7 +46,7 @@
namespace DOL.GS.Quests.Hibernia
{
- public class childsplay : BaseQuest
+ public class ChildsPlay : BaseQuest
{
///
/// Defines a logger for this class.
@@ -82,22 +82,22 @@ public class childsplay : BaseQuest
private static IArea Hib_Statue_Area = null;
- public childsplay()
+ public ChildsPlay()
: base()
{
}
- public childsplay(GamePlayer questingPlayer)
+ public ChildsPlay(GamePlayer questingPlayer)
: this(questingPlayer, 1)
{
}
- public childsplay(GamePlayer questingPlayer, int step)
+ public ChildsPlay(GamePlayer questingPlayer, int step)
: base(questingPlayer, step)
{
}
- public childsplay(GamePlayer questingPlayer, DBQuest dbQuest)
+ public ChildsPlay(GamePlayer questingPlayer, DBQuest dbQuest)
: base(questingPlayer, dbQuest)
{
}
@@ -1481,7 +1481,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.AddHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.AddHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
- Charles.AddQuestToGive(typeof(childsplay));
+ Charles.AddQuestToGive(typeof(ChildsPlay));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" (Hib) initialized");
}
@@ -1501,7 +1501,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
- Charles.RemoveQuestToGive(typeof(childsplay));
+ Charles.RemoveQuestToGive(typeof(ChildsPlay));
}
protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
@@ -1510,10 +1510,10 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
if (player == null)
return;
- if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
+ if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
Charles.TurnTo(player);
@@ -1580,7 +1580,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText2"))
{
Charles.SayTo(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text5"));
- player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(childsplay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
+ player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(ChildsPlay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
}
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText3"))
{
@@ -1595,7 +1595,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
/// true if qualified, false if not
public override bool CheckQuestQualification(GamePlayer player)
{
- if (player.IsDoingQuest(typeof(childsplay)) != null)
+ if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return true;
if (player.Level < minimumLevel || player.Level > maximumLevel)
@@ -1606,7 +1606,7 @@ public override bool CheckQuestQualification(GamePlayer player)
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
if (quest == null)
return;
@@ -1628,7 +1628,7 @@ protected static void SubscribeQuest(DOLEvent e, object sender, EventArgs args)
if (qargs == null)
return;
- if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(childsplay)))
+ if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(ChildsPlay)))
return;
if (e == GamePlayerEvent.AcceptQuest)
@@ -1640,7 +1640,7 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
{
AreaEventArgs aargs = args as AreaEventArgs;
GamePlayer player = aargs.GameObject as GamePlayer;
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
if (quest != null && quest.Step == 1)
{
@@ -1650,10 +1650,10 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
}
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
- if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
+ if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;
- if (player.IsDoingQuest(typeof(childsplay)) != null)
+ if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return;
if (response == 0x00)
@@ -1662,7 +1662,7 @@ private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
}
else
{
- if (!Charles.GiveQuest(typeof(childsplay), player, 1))
+ if (!Charles.GiveQuest(typeof(ChildsPlay), player, 1))
return;
SendReply(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAcceptQuest.Text2"));
}
diff --git a/GameServerScripts/quests/Midgard/Bad_Food.cs b/GameServerScripts/quests/Midgard/Bad_Food.cs
index d96c53fc48..ced1f07c2d 100644
--- a/GameServerScripts/quests/Midgard/Bad_Food.cs
+++ b/GameServerScripts/quests/Midgard/Bad_Food.cs
@@ -44,7 +44,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class badfood : BaseQuest
+ public class BadFood : BaseQuest
{
///
/// Defines a logger for this class.
@@ -82,19 +82,19 @@ public class badfood : BaseQuest
/*
* Constructor
*/
- public badfood() : base()
+ public BadFood() : base()
{
}
- public badfood(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public BadFood(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public badfood(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public BadFood(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public badfood(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public BadFood(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -273,56 +273,56 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(badfood));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(BadFood));
QuestBehaviour a;
a = builder.CreateBehaviour(Pedra,-1);
a.AddTrigger(eTriggerType.Interact,null,Pedra);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.badfood),Pedra);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.badfood),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.BadFood),Pedra);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.BadFood),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Oh, I am not feeling very well at all. I don't think there's one member of this town that hasn't felt a little queasy at least (once?) from all the bad fish we've [eaten].",Pedra);
AddBehaviour(a);
a = builder.CreateBehaviour(Pedra,-1);
a.AddTrigger(eTriggerType.Whisper,"eaten",Pedra);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.badfood),Pedra);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.badfood),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.BadFood),Pedra);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.BadFood),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Aye, and now Kedra, the healer, is busy sorting out the worst! It turns out we are ate some bad fish. Now, Kedra says she is running our of her cure, and doesn't have time to get any more of the ingredients! Do you think you could help?",Pedra);
- a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.badfood),"Will you help the healer out?");
+ a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.BadFood),"Will you help the healer out?");
AddBehaviour(a);
a = builder.CreateBehaviour(Pedra,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.badfood));
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.badfood),Pedra);
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.BadFood));
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.BadFood),Pedra);
a.AddAction(eActionType.Talk,"Oh good! Talk to Kedra about bad fish. She'll tell you what needs to be done.",Pedra);
- a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.badfood),2);
+ a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),2);
AddBehaviour(a);
a = builder.CreateBehaviour(Kedra,-1);
a.AddTrigger(eTriggerType.Interact,null,Kedra);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.badfood),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),2,(eComparator)3);
a.AddAction(eActionType.Talk,"Fish! The entire town has eaten bad fish! It is crazy! I told them not to! I told them the moon's position in the sky indicated a bad harvest of fish, but did anyone listen? And now, everyone is [sick].",Kedra);
AddBehaviour(a);
a = builder.CreateBehaviour(Kedra,-1);
a.AddTrigger(eTriggerType.Whisper,"sick",Kedra);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.badfood),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),2,(eComparator)3);
a.AddAction(eActionType.Talk,"Yes. Sick. Why are you here? Are you sick? You don't look sick to me. You can help me. I am running out of my cure! I don't have time to go get the [marine fungus] I need!",Kedra);
AddBehaviour(a);
a = builder.CreateBehaviour(Kedra,-1);
a.AddTrigger(eTriggerType.Whisper,"marine fungus",Kedra);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.badfood),2,(eComparator)3);
- a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.badfood),3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),2,(eComparator)3);
+ a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),3);
a.AddAction(eActionType.Talk,"Aye. I mash it up and add herbs to it. It's a great cure! I need more though! Go get me a marine fungus. I will pay you for it! And the whole town will thank you, when they are through wretching up the illness, that is.",Kedra);
AddBehaviour(a);
a = builder.CreateBehaviour(Pedra,-1);
a.AddTrigger(eTriggerType.EnemyKilled,"marine fungus",null);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.badfood),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),3,(eComparator)3);
a.AddAction(eActionType.GiveItem,marinefungus,null);
- a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.badfood),4);
+ a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),4);
AddBehaviour(a);
a = builder.CreateBehaviour(Kedra,-1);
a.AddTrigger(eTriggerType.Interact,null,Kedra);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.badfood),4,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.BadFood),4,(eComparator)3);
a.AddAction(eActionType.Talk,"Oh thank you! The stench of the ill is getting to me! I can make a few more batches of my cure after this, and then be done with it all! This will teach everyone to ignore me! Let's see if they eat the fish the next time I say the moon isn't right! Here, I hope this is enough. Thank you for your aid!",Kedra);
a.AddAction(eActionType.GiveGold,305,null);
a.AddAction(eActionType.GiveXP,20,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.badfood),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.BadFood),null);
a.AddAction(eActionType.TakeItem,marinefungus,null);
AddBehaviour(a);
@@ -332,7 +332,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
- Pedra.AddQuestToGive(typeof (badfood));
+ Pedra.AddQuestToGive(typeof (BadFood));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
@@ -353,7 +353,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (Pedra == null)
return;
/* Now we remove the possibility to give this quest to players */
- Pedra.RemoveQuestToGive(typeof (badfood));
+ Pedra.RemoveQuestToGive(typeof (BadFood));
}
/* Now we set the quest name.
@@ -404,7 +404,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (badfood)) != null)
+ if (player.IsDoingQuest(typeof (BadFood)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/Childs_Play.cs b/GameServerScripts/quests/Midgard/Childs_Play.cs
index 02679a8baa..bce63a785e 100644
--- a/GameServerScripts/quests/Midgard/Childs_Play.cs
+++ b/GameServerScripts/quests/Midgard/Childs_Play.cs
@@ -45,7 +45,7 @@
namespace DOL.GS.Quests.Midgard
{
- public class childsplay : BaseQuest
+ public class ChildsPlay : BaseQuest
{
///
/// Defines a logger for this class.
@@ -83,22 +83,22 @@ public class childsplay : BaseQuest
private static IArea Mid_Statue_Area = null;
- public childsplay()
+ public ChildsPlay()
: base()
{
}
- public childsplay(GamePlayer questingPlayer)
+ public ChildsPlay(GamePlayer questingPlayer)
: this(questingPlayer, 1)
{
}
- public childsplay(GamePlayer questingPlayer, int step)
+ public ChildsPlay(GamePlayer questingPlayer, int step)
: base(questingPlayer, step)
{
}
- public childsplay(GamePlayer questingPlayer, DBQuest dbQuest)
+ public ChildsPlay(GamePlayer questingPlayer, DBQuest dbQuest)
: base(questingPlayer, dbQuest)
{
}
@@ -1484,7 +1484,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.AddHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.AddHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
- Charles.AddQuestToGive(typeof(childsplay));
+ Charles.AddQuestToGive(typeof(ChildsPlay));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
@@ -1507,7 +1507,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.Interact, new DOLEventHandler(TalkToCharles));
GameEventMgr.RemoveHandler(Charles, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToCharles));
- Charles.RemoveQuestToGive(typeof(childsplay));
+ Charles.RemoveQuestToGive(typeof(ChildsPlay));
}
protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
@@ -1516,10 +1516,10 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
if (player == null)
return;
- if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
+ if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
Charles.TurnTo(player);
@@ -1586,7 +1586,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText2"))
{
Charles.SayTo(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text5"));
- player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(childsplay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
+ player.Out.SendQuestSubscribeCommand(Charles, QuestMgr.GetIDForQuestType(typeof(ChildsPlay)), LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.Text6"));
}
else if (lowerCase == LanguageMgr.GetTranslation(player.Client, "ChildsPlay.TalkToCharles.CaseText3"))
{
@@ -1601,7 +1601,7 @@ protected static void TalkToCharles(DOLEvent e, object sender, EventArgs args)
/// true if qualified, false if not
public override bool CheckQuestQualification(GamePlayer player)
{
- if (player.IsDoingQuest(typeof(childsplay)) != null)
+ if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return true;
if (player.Level < minimumLevel || player.Level > maximumLevel)
@@ -1612,7 +1612,7 @@ public override bool CheckQuestQualification(GamePlayer player)
private static void CheckPlayerAbortQuest(GamePlayer player, byte response)
{
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
if (quest == null)
return;
@@ -1634,7 +1634,7 @@ protected static void SubscribeQuest(DOLEvent e, object sender, EventArgs args)
if (qargs == null)
return;
- if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(childsplay)))
+ if (qargs.QuestID != QuestMgr.GetIDForQuestType(typeof(ChildsPlay)))
return;
if (e == GamePlayerEvent.AcceptQuest)
@@ -1646,7 +1646,7 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
{
AreaEventArgs aargs = args as AreaEventArgs;
GamePlayer player = aargs.GameObject as GamePlayer;
- childsplay quest = player.IsDoingQuest(typeof(childsplay)) as childsplay;
+ ChildsPlay quest = player.IsDoingQuest(typeof(ChildsPlay)) as ChildsPlay;
if (quest != null && quest.Step == 1)
{
@@ -1656,10 +1656,10 @@ protected static void PlayerEnterStatueArea(DOLEvent e, object sender, EventArgs
}
private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
{
- if (Charles.CanGiveQuest(typeof(childsplay), player) <= 0)
+ if (Charles.CanGiveQuest(typeof(ChildsPlay), player) <= 0)
return;
- if (player.IsDoingQuest(typeof(childsplay)) != null)
+ if (player.IsDoingQuest(typeof(ChildsPlay)) != null)
return;
if (response == 0x00)
@@ -1668,7 +1668,7 @@ private static void CheckPlayerAcceptQuest(GamePlayer player, byte response)
}
else
{
- if (!Charles.GiveQuest(typeof(childsplay), player, 1))
+ if (!Charles.GiveQuest(typeof(ChildsPlay), player, 1))
return;
SendReply(player, LanguageMgr.GetTranslation(player.Client, "ChildsPlay.CheckPlayerAcceptQuest.Text2"));
}
diff --git a/GameServerScripts/quests/Midgard/Essence_of_Life.cs b/GameServerScripts/quests/Midgard/Essence_of_Life.cs
index 5603265a99..7479bd5965 100644
--- a/GameServerScripts/quests/Midgard/Essence_of_Life.cs
+++ b/GameServerScripts/quests/Midgard/Essence_of_Life.cs
@@ -44,7 +44,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class essenceoflife : BaseQuest
+ public class EssenceOfLife : BaseQuest
{
///
/// Defines a logger for this class.
@@ -84,19 +84,19 @@ public class essenceoflife : BaseQuest
/*
* Constructor
*/
- public essenceoflife() : base()
+ public EssenceOfLife() : base()
{
}
- public essenceoflife(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public EssenceOfLife(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public essenceoflife(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public EssenceOfLife(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public essenceoflife(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public EssenceOfLife(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -347,26 +347,26 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(essenceoflife));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(EssenceOfLife));
QuestBehaviour a;
a = builder.CreateBehaviour(Ballach,-1);
a.AddTrigger(eTriggerType.Interact,null,Ballach);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.essenceoflife),Ballach);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),Ballach);
a.AddAction(eActionType.Talk,"Greetings Guardian. I have some [business] that needs tended to. There is some coin involved in it for you.",Ballach);
AddBehaviour(a);
a = builder.CreateBehaviour(Ballach,-1);
a.AddTrigger(eTriggerType.Whisper,"business",Ballach);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.essenceoflife),Ballach);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),Ballach);
a.AddAction(eActionType.Talk,"I am running low on Essence of Life. Do you think you could retrieve some for me?",Ballach);
- a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.essenceoflife),"Will you aid Ballach and retrieve some Essence of Life? [Levels 1-4]");
+ a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),"Will you aid Ballach and retrieve some Essence of Life? [Levels 1-4]");
AddBehaviour(a);
a = builder.CreateBehaviour(Ballach,-1);
- a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.essenceoflife));
+ a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.EssenceOfLife));
a.AddAction(eActionType.Talk,"No problem. See you.",Ballach);
AddBehaviour(a);
a = builder.CreateBehaviour(Ballach,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.essenceoflife));
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.essenceoflife),Ballach);
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.EssenceOfLife));
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),Ballach);
a.AddAction(eActionType.Talk,"Thank you very much for offering to help. Here, take this enchanted flask. You will need to find a grave in the Burial Grounds. When you find one, use the flask and capture the essence of life that rests in the buried persons remains.",Ballach);
a.AddAction(eActionType.GiveItem,enchantedflask,Ballach);
AddBehaviour(a);
@@ -379,11 +379,11 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
a = builder.CreateBehaviour(Ballach,-1);
a.AddTrigger(eTriggerType.Timer,"flask",null);
a.AddAction(eActionType.ReplaceItem,enchantedflask,Flaskofetherealessence);
- a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.essenceoflife),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),null);
AddBehaviour(a);
a = builder.CreateBehaviour(Ballach,-1);
a.AddTrigger(eTriggerType.Interact,null,Ballach);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.essenceoflife),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),2,(eComparator)3);
a.AddAction(eActionType.Talk,"Did you collect the essence for me? If so, hand me the flask.",Ballach);
AddBehaviour(a);
a = builder.CreateBehaviour(Ballach,-1);
@@ -391,7 +391,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
a.AddAction(eActionType.Talk,"Thank you for taking on this task for me. You have replenished my supply. Here, take this small monetary reward.",Ballach);
a.AddAction(eActionType.GiveXP,60,null);
a.AddAction(eActionType.GiveGold,18,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.essenceoflife),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.EssenceOfLife),null);
AddBehaviour(a);
#endregion
@@ -400,7 +400,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
- Ballach.AddQuestToGive(typeof (essenceoflife));
+ Ballach.AddQuestToGive(typeof (EssenceOfLife));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
@@ -421,7 +421,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (Ballach == null)
return;
/* Now we remove the possibility to give this quest to players */
- Ballach.RemoveQuestToGive(typeof (essenceoflife));
+ Ballach.RemoveQuestToGive(typeof (EssenceOfLife));
}
/* Now we set the quest name.
@@ -466,7 +466,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (essenceoflife)) != null)
+ if (player.IsDoingQuest(typeof (EssenceOfLife)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/Mauler_Invasion.cs b/GameServerScripts/quests/Midgard/Mauler_Invasion.cs
index ad4d2d856f..60c4da88b8 100644
--- a/GameServerScripts/quests/Midgard/Mauler_Invasion.cs
+++ b/GameServerScripts/quests/Midgard/Mauler_Invasion.cs
@@ -45,7 +45,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class maulerinvasion : BaseQuest
+ public class MaulerInvasion : BaseQuest
{
///
/// Defines a logger for this class.
@@ -81,19 +81,19 @@ public class maulerinvasion : BaseQuest
/*
* Constructor
*/
- public maulerinvasion() : base()
+ public MaulerInvasion() : base()
{
}
- public maulerinvasion(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public MaulerInvasion(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public maulerinvasion(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public MaulerInvasion(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public maulerinvasion(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public MaulerInvasion(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -228,110 +228,110 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(maulerinvasion));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(MaulerInvasion));
QuestBehaviour a;
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Interact,null,VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.maulerinvasion),VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),VikingKreimhilde);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk1"), VikingKreimhilde);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Whisper1"), VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.maulerinvasion), VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.MaulerInvasion), VikingKreimhilde);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk2"), VikingKreimhilde);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Whisper2"), VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.maulerinvasion),VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),VikingKreimhilde);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk3"), VikingKreimhilde);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Whisper3"), VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.maulerinvasion),VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),VikingKreimhilde);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk4"), null);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Whisper4"), VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.maulerinvasion),VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),VikingKreimhilde);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk5"), VikingKreimhilde);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Whisper5"), VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.maulerinvasion),VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null,(eComparator)5);
- a.AddAction(eActionType.OfferQuest, typeof(DOL.GS.Quests.Midgard.maulerinvasion), LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.OfferQuest"));
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),VikingKreimhilde);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null,(eComparator)5);
+ a.AddAction(eActionType.OfferQuest, typeof(DOL.GS.Quests.Midgard.MaulerInvasion), LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.OfferQuest"));
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
- a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.maulerinvasion));
+ a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.MaulerInvasion));
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk6"), VikingKreimhilde);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.maulerinvasion));
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.maulerinvasion),VikingKreimhilde);
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.MaulerInvasion));
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),VikingKreimhilde);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk7"), VikingKreimhilde);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.EnemyKilled, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.EnemyKilled"), null);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),3,(eComparator)1);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),3,(eComparator)1);
a.AddAction(eActionType.GiveItem,blackmaulercubpelt,null);
- a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.Interact,null,VikingKreimhilde);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),3,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk8"), VikingKreimhilde);
- a.AddAction(eActionType.SetQuestStep,typeof(maulerinvasion),4);
+ a.AddAction(eActionType.SetQuestStep,typeof(MaulerInvasion),4);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.GiveItem,VikingKreimhilde,blackmaulercubpelt);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),4,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),4,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk9"), VikingKreimhilde);
- a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),5);
+ a.AddAction(eActionType.SetQuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),5);
a.AddAction(eActionType.TakeItem,blackmaulercubpelt,null);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.GiveItem,VikingKreimhilde,blackmaulercubpelt);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),5,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),5,(eComparator)3);
a.AddRequirement(eRequirementType.Level,1,null,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk10"), VikingKreimhilde);
a.AddAction(eActionType.GiveXP,5,null);
a.AddAction(eActionType.GiveGold,27,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null);
a.AddAction(eActionType.TakeItem,blackmaulercubpelt,null);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.GiveItem,VikingKreimhilde,blackmaulercubpelt);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),5,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),5,(eComparator)3);
a.AddRequirement(eRequirementType.Level,2,null,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk10"), VikingKreimhilde);
a.AddAction(eActionType.GiveXP,20,null);
a.AddAction(eActionType.GiveGold,27,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null);
a.AddAction(eActionType.TakeItem,blackmaulercubpelt,null);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.GiveItem,VikingKreimhilde,blackmaulercubpelt);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),5,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),5,(eComparator)3);
a.AddRequirement(eRequirementType.Level,3,null,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk10"), VikingKreimhilde);
a.AddAction(eActionType.GiveXP,40,null);
a.AddAction(eActionType.GiveGold,27,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null);
a.AddAction(eActionType.TakeItem,blackmaulercubpelt,null);
AddBehaviour(a);
a = builder.CreateBehaviour(VikingKreimhilde,-1);
a.AddTrigger(eTriggerType.GiveItem,VikingKreimhilde,blackmaulercubpelt);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.maulerinvasion),5,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),5,(eComparator)3);
a.AddRequirement(eRequirementType.Level,4,null,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.MaulerInvasion.Talk10"), VikingKreimhilde);
a.AddAction(eActionType.GiveXP,60,null);
a.AddAction(eActionType.GiveGold,27,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.maulerinvasion),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.MaulerInvasion),null);
a.AddAction(eActionType.TakeItem,blackmaulercubpelt,null);
AddBehaviour(a);
@@ -341,7 +341,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
- VikingKreimhilde.AddQuestToGive(typeof (maulerinvasion));
+ VikingKreimhilde.AddQuestToGive(typeof (MaulerInvasion));
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
}
@@ -362,7 +362,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (VikingKreimhilde == null)
return;
/* Now we remove the possibility to give this quest to players */
- VikingKreimhilde.RemoveQuestToGive(typeof (maulerinvasion));
+ VikingKreimhilde.RemoveQuestToGive(typeof (MaulerInvasion));
}
/* Now we set the quest name.
@@ -416,7 +416,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (maulerinvasion)) != null)
+ if (player.IsDoingQuest(typeof (MaulerInvasion)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/Mead_Run.cs b/GameServerScripts/quests/Midgard/Mead_Run.cs
index da1c95b2bb..e90a487c7b 100644
--- a/GameServerScripts/quests/Midgard/Mead_Run.cs
+++ b/GameServerScripts/quests/Midgard/Mead_Run.cs
@@ -44,7 +44,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class meadrun : BaseQuest
+ public class MeadRun : BaseQuest
{
///
/// Defines a logger for this class.
@@ -84,19 +84,19 @@ public class meadrun : BaseQuest
/*
* Constructor
*/
- public meadrun() : base()
+ public MeadRun() : base()
{
}
- public meadrun(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public MeadRun(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public meadrun(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public MeadRun(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public meadrun(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public MeadRun(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -354,46 +354,46 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(meadrun));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(MeadRun));
QuestBehaviour a;
a = builder.CreateBehaviour(Audun,-1);
a.AddTrigger(eTriggerType.Interact,null,Audun);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.meadrun),Audun);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.meadrun),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MeadRun),Audun);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MeadRun),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Greetings. You appear to be down on your luck. I have a [proposition] for you if you're interested.",null);
AddBehaviour(a);
a = builder.CreateBehaviour(Audun,-1);
a.AddTrigger(eTriggerType.Whisper,"proposition",Audun);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.meadrun),Audun);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.meadrun),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.MeadRun),Audun);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MeadRun),null,(eComparator)5);
a.AddAction(eActionType.Talk,"I need to deliver some mead to the guards just inside the Burial Grounds. There is a bit of coin to be had if you would deliver the mead for me.",Audun);
- a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.meadrun),"Will you deliver the mead for Audun? [Levels 1-4]");
+ a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.MeadRun),"Will you deliver the mead for Audun? [Levels 1-4]");
AddBehaviour(a);
a = builder.CreateBehaviour(Audun,-1);
- a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.meadrun));
+ a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.MeadRun));
a.AddAction(eActionType.Talk,"No problem. See you",Audun);
AddBehaviour(a);
a = builder.CreateBehaviour(Audun,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.meadrun));
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.MeadRun));
a.AddAction(eActionType.Talk,"Here take the mead to Guard Olja inside the entrance of the Burial Grounds.",Audun);
a.AddAction(eActionType.GiveItem,bottleofmead,Audun);
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.meadrun),Audun);
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.MeadRun),Audun);
AddBehaviour(a);
a = builder.CreateBehaviour(GuardOlja,-1);
a.AddTrigger(eTriggerType.GiveItem,GuardOlja,bottleofmead);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.meadrun),null);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.MeadRun),null);
a.AddAction(eActionType.Talk,"Thanks. Here, take this empty bottle back to Auduan.",GuardOlja);
a.AddAction(eActionType.GiveItem,emptybottle,GuardOlja);
a.AddAction(eActionType.TakeItem,bottleofmead,null);
- a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.meadrun),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.MeadRun),null);
AddBehaviour(a);
a = builder.CreateBehaviour(Audun,-1);
a.AddTrigger(eTriggerType.GiveItem,Audun,emptybottle);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.meadrun),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.MeadRun),2,(eComparator)3);
a.AddAction(eActionType.Talk,"Good work. Here is that bit of coin I was talking about. Check back with me later, and I may have more work for you.",Audun);
a.AddAction(eActionType.GiveXP,5,null);
a.AddAction(eActionType.GiveGold,27,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.meadrun),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.MeadRun),null);
AddBehaviour(a);
#endregion
@@ -402,7 +402,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
if (Audun!=null) {
- Audun.AddQuestToGive(typeof (meadrun));
+ Audun.AddQuestToGive(typeof (MeadRun));
}
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
@@ -424,7 +424,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (Audun == null)
return;
/* Now we remove the possibility to give this quest to players */
- Audun.RemoveQuestToGive(typeof (meadrun));
+ Audun.RemoveQuestToGive(typeof (MeadRun));
}
/* Now we set the quest name.
@@ -469,7 +469,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (meadrun)) != null)
+ if (player.IsDoingQuest(typeof (MeadRun)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/Rindas_Lost_Key.cs b/GameServerScripts/quests/Midgard/Rindas_Lost_Key.cs
index 0a1a7e6962..8fde4b3f72 100644
--- a/GameServerScripts/quests/Midgard/Rindas_Lost_Key.cs
+++ b/GameServerScripts/quests/Midgard/Rindas_Lost_Key.cs
@@ -44,7 +44,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class rindaslostkey : BaseQuest
+ public class Rindaslostkey : BaseQuest
{
///
/// Defines a logger for this class.
@@ -86,19 +86,19 @@ public class rindaslostkey : BaseQuest
/*
* Constructor
*/
- public rindaslostkey() : base()
+ public Rindaslostkey() : base()
{
}
- public rindaslostkey(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public Rindaslostkey(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public rindaslostkey(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public Rindaslostkey(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public rindaslostkey(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public Rindaslostkey(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -429,62 +429,62 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(rindaslostkey));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(Rindaslostkey));
QuestBehaviour a;
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.Interact,null,DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.rindaslostkey),DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),DwarvenGuardRinda);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Greetings, and welcome to the dwarf town of Haggerfel. I wish I could stay and talk with you for a moment, but I am in a hurry to find my [lost keys].",DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.Whisper,"lost keys",DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.rindaslostkey),DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),DwarvenGuardRinda);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Oh yes. It is dreadful that I was so careless as to lost them like this! You see, I am responsible for helping to lock the money the merchants bring in during the day into a large chest. I am the only one with the keys, and I have [misplaced them].",DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.Whisper,"misplaced them",DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.rindaslostkey),DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),DwarvenGuardRinda);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Oh, this makes me so angry! I have searched all around Haggerfel for them, but they are no where to be found. I don't suppose you would have a [little time] to help me out, would you?",DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.Whisper,"little time",DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.rindaslostkey),DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null,(eComparator)5);
- a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.rindaslostkey),"Will you help Rinda find her keys?");
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),DwarvenGuardRinda);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null,(eComparator)5);
+ a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),"Will you help Rinda find her keys?");
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
- a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.rindaslostkey));
+ a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.Rindaslostkey));
a.AddAction(eActionType.Talk,"No problem. See you",DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.rindaslostkey));
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.rindaslostkey),DwarvenGuardRinda);
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.Rindaslostkey));
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),DwarvenGuardRinda);
a.AddAction(eActionType.Talk,"Thank you! Thank you! I know there are some hobgoblins around that like to play jokes on people, viscious and mean ones. Why don't you check there while I check the merchant huts again?",DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(hobgoblinsnakefinder,-1);
a.AddTrigger(eTriggerType.Interact,null,hobgoblinsnakefinder);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),1,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),1,(eComparator)3);
a.AddAction(eActionType.Talk,"Ha ha! Me no have keys! Feed to hungry bear! haha! You no help Rinda...Gold be ours!",hobgoblinsnakefinder);
a.AddAction(eActionType.GiveItem,ironkeychain,hobgoblinsnakefinder);
- a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.EnemyKilled,"black mauler cub",null);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),2,(eComparator)3);
a.AddAction(eActionType.GiveItem,rindaskey,null);
- a.AddAction(eActionType.IncQuestStep,typeof(rindaslostkey),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(Rindaslostkey),null);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.Interact,null,DwarvenGuardRinda);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),3,(eComparator)3);
a.AddAction(eActionType.Talk,"I couldn't find them again in the village. Did you have better luck?",DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.GiveItem,DwarvenGuardRinda,ironkeychain);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),3,(eComparator)3);
a.AddAction(eActionType.Talk,"Oh my keychain. Well, this is a good start. But you didn't happen to find my key, did you?",DwarvenGuardRinda);
a.AddAction(eActionType.GiveXP,20,null);
a.AddAction(eActionType.GiveGold,225,null);
@@ -492,24 +492,24 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.GiveItem,DwarvenGuardRinda,rindaskey);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),3,(eComparator)3);
a.AddRequirement(eRequirementType.InventoryItem,ironkeychain,null,(eComparator)3);
a.AddAction(eActionType.Talk,"Ah! This is great! My key! You have done a fabulous job in helping me. Please accept this coin in return for your time and effort. Thank you so much! Now, I can safely lock up the town's money. Thank you!",DwarvenGuardRinda);
a.AddAction(eActionType.TakeItem,rindaskey,null);
a.AddAction(eActionType.TakeItem,ironkeychain,null);
a.AddAction(eActionType.GiveXP,40,null);
a.AddAction(eActionType.GiveGold,450,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null);
a.AddAction(eActionType.GiveItem,silverringofhealth,DwarvenGuardRinda);
AddBehaviour(a);
a = builder.CreateBehaviour(DwarvenGuardRinda,-1);
a.AddTrigger(eTriggerType.GiveItem,DwarvenGuardRinda,rindaskey);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.rindaslostkey),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),3,(eComparator)3);
a.AddRequirement(eRequirementType.InventoryItem,ironkeychain,null,(eComparator)1);
a.AddAction(eActionType.Talk,"Ah! This is great! My key! You have done a fabulous job in helping me. Please accept this coin in return for your time and effort. Thank you so much! Now, I can safely lock up the town's money. Thank you!",DwarvenGuardRinda);
a.AddAction(eActionType.GiveXP,20,null);
a.AddAction(eActionType.GiveGold,225,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.rindaslostkey),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.Rindaslostkey),null);
a.AddAction(eActionType.TakeItem,rindaskey,null);
a.AddAction(eActionType.GiveItem,silverringofhealth,DwarvenGuardRinda);
AddBehaviour(a);
@@ -520,7 +520,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
if (DwarvenGuardRinda!=null) {
- DwarvenGuardRinda.AddQuestToGive(typeof (rindaslostkey));
+ DwarvenGuardRinda.AddQuestToGive(typeof (Rindaslostkey));
}
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
@@ -542,7 +542,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (DwarvenGuardRinda == null)
return;
/* Now we remove the possibility to give this quest to players */
- DwarvenGuardRinda.RemoveQuestToGive(typeof (rindaslostkey));
+ DwarvenGuardRinda.RemoveQuestToGive(typeof (Rindaslostkey));
}
/* Now we set the quest name.
@@ -590,7 +590,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (rindaslostkey)) != null)
+ if (player.IsDoingQuest(typeof (Rindaslostkey)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/Sveabone_Hilt_Sword.cs b/GameServerScripts/quests/Midgard/Sveabone_Hilt_Sword.cs
index 34d16e8ab5..1f4120a3d5 100644
--- a/GameServerScripts/quests/Midgard/Sveabone_Hilt_Sword.cs
+++ b/GameServerScripts/quests/Midgard/Sveabone_Hilt_Sword.cs
@@ -44,7 +44,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class sveabonehiltsword : BaseQuest
+ public class SveaboneHiltSword : BaseQuest
{
///
/// Defines a logger for this class.
@@ -84,19 +84,19 @@ public class sveabonehiltsword : BaseQuest
/*
* Constructor
*/
- public sveabonehiltsword() : base()
+ public SveaboneHiltSword() : base()
{
}
- public sveabonehiltsword(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public SveaboneHiltSword(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public sveabonehiltsword(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public SveaboneHiltSword(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public sveabonehiltsword(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public SveaboneHiltSword(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -386,57 +386,57 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(sveabonehiltsword));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(SveaboneHiltSword));
QuestBehaviour a;
a = builder.CreateBehaviour(Gridash,-1);
a.AddTrigger(eTriggerType.Interact,null,Gridash);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),Gridash);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),Gridash);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Hail young one! I have noticed that you do not carry one of my fine [bone hilt swords].",Gridash);
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
a.AddTrigger(eTriggerType.Whisper,"bone hilt swords",Gridash);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),Gridash);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),Gridash);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),null,(eComparator)5);
a.AddAction(eActionType.Talk,"Aye! They are some of my finest works! I don't suppose you [would care for one] eh?",Gridash);
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
a.AddTrigger(eTriggerType.Whisper,"would care for one",Gridash);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),Gridash);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),null,(eComparator)5);
- a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),"Will you do what is asked so that Gridash can make a Sveabone hilt sword?");
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),Gridash);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),null,(eComparator)5);
+ a.AddAction(eActionType.OfferQuest,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),"Will you do what is asked so that Gridash can make a Sveabone hilt sword?");
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
- a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword));
+ a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword));
a.AddAction(eActionType.Talk,"No problem. See you",Gridash);
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword));
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword));
a.AddAction(eActionType.Talk,"Oh great then! Run along and buy me a bronze short sword. I should be ready once you return.",Gridash);
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),Gridash);
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),Gridash);
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
a.AddTrigger(eTriggerType.GiveItem,Gridash,bronze_short_sword);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),null);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),null);
a.AddAction(eActionType.Talk,"Good work! I cannot seem to find anymore sveawolf teeth to fashion your weapon. Find one and return it to me.",Gridash);
a.AddAction(eActionType.TakeItem,bronze_short_sword,null);
- a.AddAction(eActionType.IncQuestStep,typeof(sveabonehiltsword),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(SveaboneHiltSword),null);
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
a.AddTrigger(eTriggerType.EnemyKilled,"young sveawof",null);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),2,(eComparator)3);
a.AddAction(eActionType.GiveItem,sveawolftooth,null);
- a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),null);
AddBehaviour(a);
a = builder.CreateBehaviour(Gridash,-1);
a.AddTrigger(eTriggerType.GiveItem,Gridash,sveawolftooth);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),3,(eComparator)3);
a.AddAction(eActionType.Talk,"Here is your completed work. I hope it serves you well!",Gridash);
a.AddAction(eActionType.TakeItem,sveawolftooth,null);
a.AddAction(eActionType.GiveItem,sveabone_hilt_sword,Gridash);
a.AddAction(eActionType.GiveXP,20,null);
a.AddAction(eActionType.GiveGold,450,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.sveabonehiltsword),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.SveaboneHiltSword),null);
AddBehaviour(a);
#endregion
@@ -445,7 +445,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
if (Gridash!=null) {
- Gridash.AddQuestToGive(typeof (sveabonehiltsword));
+ Gridash.AddQuestToGive(typeof (SveaboneHiltSword));
}
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
@@ -467,7 +467,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (Gridash == null)
return;
/* Now we remove the possibility to give this quest to players */
- Gridash.RemoveQuestToGive(typeof (sveabonehiltsword));
+ Gridash.RemoveQuestToGive(typeof (SveaboneHiltSword));
}
/* Now we set the quest name.
@@ -515,7 +515,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (sveabonehiltsword)) != null)
+ if (player.IsDoingQuest(typeof (SveaboneHiltSword)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/The_Birthday_Gift.cs b/GameServerScripts/quests/Midgard/The_Birthday_Gift.cs
index 52c59994b3..24866ff242 100644
--- a/GameServerScripts/quests/Midgard/The_Birthday_Gift.cs
+++ b/GameServerScripts/quests/Midgard/The_Birthday_Gift.cs
@@ -45,7 +45,7 @@ namespace DOL.GS.Quests.Midgard {
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class thebirthdaygift : BaseQuest
+ public class TheBirthDayGift : BaseQuest
{
///
/// Defines a logger for this class.
@@ -84,19 +84,19 @@ public class thebirthdaygift : BaseQuest
/*
* Constructor
*/
- public thebirthdaygift() : base()
+ public TheBirthDayGift() : base()
{
}
- public thebirthdaygift(GamePlayer questingPlayer) : this(questingPlayer, 1)
+ public TheBirthDayGift(GamePlayer questingPlayer) : this(questingPlayer, 1)
{
}
- public thebirthdaygift(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
+ public TheBirthDayGift(GamePlayer questingPlayer, int step) : base(questingPlayer, step)
{
}
- public thebirthdaygift(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
+ public TheBirthDayGift(GamePlayer questingPlayer, DBQuest dbQuest) : base(questingPlayer, dbQuest)
{
}
@@ -345,99 +345,99 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(thebirthdaygift));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(TheBirthDayGift));
QuestBehaviour a;
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Interact,null,BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),BarkeepNognar);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk1"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper1"), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),BarkeepNognar);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk2"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper2"), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.thebirthdaygift), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.TheBirthDayGift), BarkeepNognar);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk3"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper3"), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),BarkeepNognar);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk4"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper4"), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null,(eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),BarkeepNognar);
+ a.AddRequirement(eRequirementType.QuestPending,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null,(eComparator)5);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk5"), BarkeepNognar);
- a.AddAction(eActionType.OfferQuest, typeof(DOL.GS.Quests.Midgard.thebirthdaygift), LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.OfferQuest"));
+ a.AddAction(eActionType.OfferQuest, typeof(DOL.GS.Quests.Midgard.TheBirthDayGift), LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.OfferQuest"));
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
- a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.thebirthdaygift));
+ a.AddTrigger(eTriggerType.DeclineQuest,null,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift));
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk6"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
- a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.thebirthdaygift));
- a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),BarkeepNognar);
+ a.AddTrigger(eTriggerType.AcceptQuest,null,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift));
+ a.AddAction(eActionType.GiveQuest,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),BarkeepNognar);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk7"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper5"), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),1,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),1,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk8"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.EnemyKilled, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.EnemyKilled"), null);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),1,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),1,(eComparator)3);
a.AddAction(eActionType.GiveItem,rattlingskeletonpendant,null);
- a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null);
+ a.AddAction(eActionType.IncQuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Interact,null,BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),2,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk9"), BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.GiveItem,BarkeepNognar,rattlingskeletonpendant);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),2,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk10"), BarkeepNognar);
a.AddAction(eActionType.TakeItem, rattlingskeletonpendant, null);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepNognar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper6"), BarkeepNognar);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),2,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),2,(eComparator)3);
a.AddRequirement(eRequirementType.InventoryItem, rattlingskeletonpendant, 0, (eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk11"), BarkeepNognar);
- a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.thebirthdaygift), null);
+ a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.TheBirthDayGift), null);
a.AddAction(eActionType.GiveItem,giftandnoteforprugar,BarkeepNognar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepPrugar,-1);
a.AddTrigger(eTriggerType.Interact,null,BarkeepPrugar);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),3,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk12"), BarkeepPrugar);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepPrugar,-1);
a.AddTrigger(eTriggerType.GiveItem,BarkeepPrugar,giftandnoteforprugar);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),3,(eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk13"), BarkeepPrugar);
a.AddAction(eActionType.TakeItem, giftandnoteforprugar, null);
AddBehaviour(a);
a = builder.CreateBehaviour(BarkeepPrugar,-1);
a.AddTrigger(eTriggerType.Whisper, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Whisper7"), BarkeepPrugar);
- a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),3,(eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),3,(eComparator)3);
a.AddRequirement(eRequirementType.InventoryItem, giftandnoteforprugar, 0, (eComparator)3);
a.AddAction(eActionType.Talk, LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Mid.TheBirthdayGift.Talk14"), BarkeepPrugar);
a.AddAction(eActionType.GiveXP, 20, null);
a.AddAction(eActionType.GiveGold,27,null);
- a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.thebirthdaygift),null);
+ a.AddAction(eActionType.FinishQuest,typeof(DOL.GS.Quests.Midgard.TheBirthDayGift),null);
AddBehaviour(a);
#endregion
@@ -446,7 +446,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
if (BarkeepNognar!=null) {
- BarkeepNognar.AddQuestToGive(typeof (thebirthdaygift));
+ BarkeepNognar.AddQuestToGive(typeof (TheBirthDayGift));
}
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
@@ -468,7 +468,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (BarkeepNognar == null)
return;
/* Now we remove the possibility to give this quest to players */
- BarkeepNognar.RemoveQuestToGive(typeof (thebirthdaygift));
+ BarkeepNognar.RemoveQuestToGive(typeof (TheBirthDayGift));
}
/* Now we set the quest name.
@@ -516,7 +516,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof (thebirthdaygift)) != null)
+ if (player.IsDoingQuest(typeof (TheBirthDayGift)) != null)
return true;
// Custom Code Begin
diff --git a/GameServerScripts/quests/Midgard/Trial_of_Strength.cs b/GameServerScripts/quests/Midgard/Trial_of_Strength.cs
index 11e03be243..744072e772 100644
--- a/GameServerScripts/quests/Midgard/Trial_of_Strength.cs
+++ b/GameServerScripts/quests/Midgard/Trial_of_Strength.cs
@@ -45,7 +45,7 @@ namespace DOL.GS.Quests.Midgard
* as Quest. To do this, we derive from the abstract class
* BaseQuest
*/
- public class trialofstrength : BaseQuest
+ public class TrialOfStrength : BaseQuest
{
///
/// Defines a logger for this class.
@@ -83,22 +83,22 @@ public class trialofstrength : BaseQuest
/*
* Constructor
*/
- public trialofstrength()
+ public TrialOfStrength()
: base()
{
}
- public trialofstrength(GamePlayer questingPlayer)
+ public TrialOfStrength(GamePlayer questingPlayer)
: this(questingPlayer, 1)
{
}
- public trialofstrength(GamePlayer questingPlayer, int step)
+ public TrialOfStrength(GamePlayer questingPlayer, int step)
: base(questingPlayer, step)
{
}
- public trialofstrength(GamePlayer questingPlayer, DBQuest dbQuest)
+ public TrialOfStrength(GamePlayer questingPlayer, DBQuest dbQuest)
: base(questingPlayer, dbQuest)
{
}
@@ -284,107 +284,107 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
#region defineQuestParts
- QuestBuilder builder = QuestMgr.getBuilder(typeof(trialofstrength));
+ QuestBuilder builder = QuestMgr.getBuilder(typeof(TrialOfStrength));
QuestBehaviour a;
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.Interact, null, ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(trialofstrength), ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.trialofstrength), null, (eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(TrialOfStrength), ToroldSterkkriger);
+ a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null, (eComparator)5);
a.AddRequirement(eRequirementType.Class, 35, false);
a.AddAction(eActionType.Talk, "Hail. I am Torold, and I shall be your trainer in this wild land. King Goran Stonefist and his brother Stonelock have charged me with training all young Vikings to prepare them to join the ranks of King Goran's army to aid in the exploration of Aegir. Aegir is a wild, untamed place, and it's made even more dangerous for a your Viking like you by the presence of [Morvaltar].", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.Interact, null, ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.trialofstrength), ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.trialofstrength), null, (eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), ToroldSterkkriger);
+ a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null, (eComparator)5);
a.AddRequirement(eRequirementType.Class, 38, false);
a.AddAction(eActionType.Talk, "Hail. I am Torold, and I shall be your trainer in this wild land. King Goran Stonefist and his brother Stonelock have charged me with training all young Rogue to prepare them to join the ranks of King Goran's army to aid in the exploration of Aegir. Aegir is a wild, untamed place, and it's made even more dangerous for a your Rogue like you by the presence of [Morvaltar].", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.Whisper, "Morvaltar", ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.trialofstrength), ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.trialofstrength), null, (eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), ToroldSterkkriger);
+ a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null, (eComparator)5);
a.AddAction(eActionType.Talk, "As you may know, the Morvaltar are your wild cousins. We of Midgard do not fear Valkyn like you, for as a group you have more than proven your loyalty to King Goran. Many Valkyn have also proven that they are strong, intelligent, and brave. These are [the qualities] that all Vikings must possess before they can choose where their destiny lies.", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.Whisper, "the qualities", ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.trialofstrength), ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.trialofstrength), null, (eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), ToroldSterkkriger);
+ a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null, (eComparator)5);
a.AddRequirement(eRequirementType.Class, 35, false);
a.AddAction(eActionType.Talk, "Now, young one, prepare yourself. You have three trials to face before I can allow you to make your destiny. These trials are designed to separate the true Vikings from the everyday Valkyn. So, prepare yourself now, for you trial is waiting for you. It is a test to [prove your strength]. Only the strongest will survive in this land.", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.Whisper, "the qualities", ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.trialofstrength), ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.trialofstrength), null, (eComparator)5);
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), ToroldSterkkriger);
+ a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null, (eComparator)5);
a.AddRequirement(eRequirementType.Class, 38, false);
a.AddAction(eActionType.Talk, "Now, young one, prepare yourself. You have three trials to face before I can allow you to make your destiny. These trials are designed to separate the true Rogues from the everyday Valkyn. So, prepare yourself now, for you trial is waiting for you. It is a test to [prove your strength]. Only the strongest will survive in this land.", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.Whisper, "prove your strength", ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.trialofstrength), ToroldSterkkriger);
- a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.trialofstrength), null, (eComparator)5);
- a.AddAction(eActionType.OfferQuest, typeof(trialofstrength), "Will you prove you have the strength to survive in the land of Aegir?");
+ a.AddRequirement(eRequirementType.QuestGivable, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), ToroldSterkkriger);
+ a.AddRequirement(eRequirementType.QuestPending, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null, (eComparator)5);
+ a.AddAction(eActionType.OfferQuest, typeof(TrialOfStrength), "Will you prove you have the strength to survive in the land of Aegir?");
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
- a.AddTrigger(eTriggerType.DeclineQuest, null, typeof(DOL.GS.Quests.Midgard.trialofstrength));
+ a.AddTrigger(eTriggerType.DeclineQuest, null, typeof(DOL.GS.Quests.Midgard.TrialOfStrength));
a.AddAction(eActionType.Talk, "No problem. See you", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
- a.AddTrigger(eTriggerType.AcceptQuest, null, typeof(DOL.GS.Quests.Midgard.trialofstrength));
- a.AddAction(eActionType.GiveQuest, typeof(DOL.GS.Quests.Midgard.trialofstrength), ToroldSterkkriger);
+ a.AddTrigger(eTriggerType.AcceptQuest, null, typeof(DOL.GS.Quests.Midgard.TrialOfStrength));
+ a.AddAction(eActionType.GiveQuest, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), ToroldSterkkriger);
a.AddAction(eActionType.Talk, "Seek out Jorund Bruttstein in Aegirhamn. Tell him your name when he asks.", ToroldSterkkriger);
AddBehaviour(a);
a = builder.CreateBehaviour(JorundBruttstein, -1);
a.AddTrigger(eTriggerType.Interact, null, JorundBruttstein);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 1, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 1, (eComparator)3);
a.AddRequirement(eRequirementType.Class, 35, false);
a.AddAction(eActionType.Talk, "Lo, I see a young Viking before me. What is your name? Speak up!", JorundBruttstein);
a.AddAction(eActionType.Talk, "You are here to prove that you have the strength in you to endure in this land. The trial is simple in nature, but unless you are strong, may prove difficult to execute. You must venture out and face [one of the creatures] that roam this land.", JorundBruttstein);
- a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), null);
+ a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null);
AddBehaviour(a);
a = builder.CreateBehaviour(JorundBruttstein, -1);
a.AddTrigger(eTriggerType.Interact, null, JorundBruttstein);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 1, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 1, (eComparator)3);
a.AddRequirement(eRequirementType.Class, 38, false);
a.AddAction(eActionType.Talk, "Lo, I see a young Rogue before me. What is your name? Speak up!", JorundBruttstein);
a.AddAction(eActionType.Talk, "You are here to prove that you have the strength in you to endure in this land. The trial is simple in nature, but unless you are strong, may prove difficult to execute. You must venture out and face [one of the creatures] that roam this land.", JorundBruttstein);
- a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), null);
+ a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null);
AddBehaviour(a);
a = builder.CreateBehaviour(JorundBruttstein, -1);
a.AddTrigger(eTriggerType.Whisper, "one of the creatures", JorundBruttstein);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 2, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 2, (eComparator)3);
a.AddAction(eActionType.Talk, "You must seek out a marine fungus. They may be found in the waters south and southwest of here. Find one and defeat it. Once you have, obtain proof that you have accomplished this test. Return to me here.", JorundBruttstein);
AddBehaviour(a);
a = builder.CreateBehaviour(ToroldSterkkriger, -1);
a.AddTrigger(eTriggerType.EnemyKilled, "marine fungus", null);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 2, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 2, (eComparator)3);
a.AddAction(eActionType.GiveItem, marinefungusroot, null);
- a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), null);
+ a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null);
AddBehaviour(a);
a = builder.CreateBehaviour(JorundBruttstein, -1);
a.AddTrigger(eTriggerType.Interact, null, JorundBruttstein);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 3, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 3, (eComparator)3);
a.AddAction(eActionType.Talk, "So, you managed to survive, but anyone can run away. Show me the proof you defeated the marine fungus.", JorundBruttstein);
- a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), null);
+ a.AddAction(eActionType.IncQuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null);
AddBehaviour(a);
a = builder.CreateBehaviour(JorundBruttstein, -1);
a.AddTrigger(eTriggerType.GiveItem, JorundBruttstein, marinefungusroot);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 4, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 4, (eComparator)3);
a.AddRequirement(eRequirementType.Class, 35, false);
a.AddAction(eActionType.Talk, "Well done. I do not like to be so rough with young Vikings, but I must be. I do not want to see anyone die because I failed to do my job. But you have proven that you have the potential for great strength. I shall let your trainer know of your success.", JorundBruttstein);
a.AddAction(eActionType.GiveXP, 20, null);
a.AddAction(eActionType.GiveGold, 230, null);
- a.AddAction(eActionType.FinishQuest, typeof(DOL.GS.Quests.Midgard.trialofstrength), null);
+ a.AddAction(eActionType.FinishQuest, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null);
AddBehaviour(a);
a = builder.CreateBehaviour(JorundBruttstein, -1);
a.AddTrigger(eTriggerType.GiveItem, JorundBruttstein, marinefungusroot);
- a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.trialofstrength), 4, (eComparator)3);
+ a.AddRequirement(eRequirementType.QuestStep, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), 4, (eComparator)3);
a.AddRequirement(eRequirementType.Class, 38, false);
a.AddAction(eActionType.Talk, "\"Well done. I do not like to be so rough with young Rogues, but I must be. I do not want to see anyone die because I failed to do my job. But you have proven that you have the potential for great strength. I shall let your trainer know of your success.", JorundBruttstein);
a.AddAction(eActionType.GiveXP, 20, null);
a.AddAction(eActionType.GiveGold, 230, null);
- a.AddAction(eActionType.FinishQuest, typeof(DOL.GS.Quests.Midgard.trialofstrength), null);
+ a.AddAction(eActionType.FinishQuest, typeof(DOL.GS.Quests.Midgard.TrialOfStrength), null);
AddBehaviour(a);
#endregion
@@ -394,7 +394,7 @@ public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
// Custom Scriptloaded Code End
if (ToroldSterkkriger != null)
{
- ToroldSterkkriger.AddQuestToGive(typeof(trialofstrength));
+ ToroldSterkkriger.AddQuestToGive(typeof(TrialOfStrength));
}
if (log.IsInfoEnabled)
log.Info("Quest \"" + questTitle + "\" initialized");
@@ -416,7 +416,7 @@ public static void ScriptUnloaded(DOLEvent e, object sender, EventArgs args)
if (ToroldSterkkriger == null)
return;
/* Now we remove the possibility to give this quest to players */
- ToroldSterkkriger.RemoveQuestToGive(typeof(trialofstrength));
+ ToroldSterkkriger.RemoveQuestToGive(typeof(TrialOfStrength));
}
/* Now we set the quest name.
@@ -467,7 +467,7 @@ public override string Description
public override bool CheckQuestQualification(GamePlayer player)
{
// if the player is already doing the quest his level is no longer of relevance
- if (player.IsDoingQuest(typeof(trialofstrength)) != null)
+ if (player.IsDoingQuest(typeof(TrialOfStrength)) != null)
return true;
// Custom Code Begin
diff --git a/Tests/IntegrationTests/DOLBase/Test_MPK.cs b/Tests/IntegrationTests/DOLBase/Test_MPK.cs
index d4153fda06..5d430a64fb 100644
--- a/Tests/IntegrationTests/DOLBase/Test_MPK.cs
+++ b/Tests/IntegrationTests/DOLBase/Test_MPK.cs
@@ -35,10 +35,10 @@ public void Save_TestTxtToMPK_CorrectCRC()
newMPK[textFileLocation].Header.TimeStamp = 0; //Make MPK creation deterministic
newMPK.Save();
- Assert.AreEqual(1, newMPK.Count);
+ Assert.That(newMPK.Count, Is.EqualTo(1));
var expectedCRCValue = 375344986;
- Assert.AreEqual(expectedCRCValue, newMPK.CRCValue);
+ Assert.That(newMPK.CRCValue, Is.EqualTo(expectedCRCValue));
}
[Test, Order(2)]
@@ -55,7 +55,7 @@ public void Extract_TestMPK_SameTxtContent()
var actualFileText = File.ReadAllText(Path.Combine(extractPath, textFileLocation));
var expectedFileText = textFileContent;
- Assert.AreEqual(expectedFileText, actualFileText);
+ Assert.That(actualFileText, Is.EqualTo(expectedFileText));
}
[OneTimeTearDown]
diff --git a/Tests/IntegrationTests/Database/CustomParamsTest.cs b/Tests/IntegrationTests/Database/CustomParamsTest.cs
index 51e233a601..c62a55407d 100644
--- a/Tests/IntegrationTests/Database/CustomParamsTest.cs
+++ b/Tests/IntegrationTests/Database/CustomParamsTest.cs
@@ -50,36 +50,36 @@ public void TableParamSaveLoadTest()
Database.DeleteObject(obj);
// Check Dynamic object is not Persisted
- Assert.IsFalse(TestData.IsPersisted, "Newly Created Data Object should not be persisted...");
- Assert.IsFalse(TestData.CustomParams.First().IsPersisted, "Newly Created Param Object should not be persisted...");
+ Assert.That(TestData.IsPersisted, Is.False, "Newly Created Data Object should not be persisted...");
+ Assert.That(TestData.CustomParams.First().IsPersisted, Is.False, "Newly Created Param Object should not be persisted...");
// Insert Object
var paramsInserted = TestData.CustomParams.Select(o => Database.AddObject(o)).ToArray();
var inserted = Database.AddObject(TestData);
- Assert.IsTrue(inserted, "Test Object not inserted properly in Database !");
- Assert.IsTrue(paramsInserted.All(result => result), "Params Objects not inserted properly in Database !");
+ Assert.That(inserted, Is.True, "Test Object not inserted properly in Database !");
+ Assert.That(paramsInserted.All(result => result), Is.True, "Params Objects not inserted properly in Database !");
// Check Saved Object is Persisted
- Assert.IsTrue(TestData.IsPersisted, "Newly Created Data Object should be persisted...");
- Assert.IsTrue(TestData.CustomParams.First().IsPersisted, "Newly Created Param Object should be persisted...");
+ Assert.That(TestData.IsPersisted, Is.True, "Newly Created Data Object should be persisted...");
+ Assert.That(TestData.CustomParams.First().IsPersisted, Is.True, "Newly Created Param Object should be persisted...");
// Retrieve Object From Database
var RetrieveData = Database.FindObjectByKey(TestData.ObjectId);
// Check Retrieved object is Persisted
- Assert.IsTrue(RetrieveData.IsPersisted, "Retrieved Data Object should be persisted...");
- Assert.IsTrue(RetrieveData.CustomParams.First().IsPersisted, "Retrieved Param Object should be persisted...");
+ Assert.That(RetrieveData.IsPersisted, Is.True, "Retrieved Data Object should be persisted...");
+ Assert.That(RetrieveData.CustomParams.First().IsPersisted, Is.True, "Retrieved Param Object should be persisted...");
// Compare both Objects
- Assert.AreEqual(TestData.ObjectId, RetrieveData.ObjectId, "Newly Created and Inserted Data Object should have the same ID than Retrieved Object.");
+ Assert.That(RetrieveData.ObjectId, Is.EqualTo(TestData.ObjectId), "Newly Created and Inserted Data Object should have the same ID than Retrieved Object.");
- Assert.AreEqual(TestData.CustomParams.Length,
- RetrieveData.CustomParams.Length,
+ Assert.That(RetrieveData.CustomParams.Length,
+ Is.EqualTo(TestData.CustomParams.Length),
"Saved Object and Retrieved Object doesn't have the same amount of Custom Params");
- Assert.AreEqual(TestData.CustomParams.First(param => param.KeyName == "TestParam").Value,
- RetrieveData.CustomParams.First(param => param.KeyName == "TestParam").Value,
+ Assert.That(RetrieveData.CustomParams.First(param => param.KeyName == "TestParam").Value,
+ Is.EqualTo(TestData.CustomParams.First(param => param.KeyName == "TestParam").Value),
"Both Saved Object and Retrieved Object should have similar Custom Params...");
}
}
diff --git a/Tests/IntegrationTests/Database/DatabaseTests.cs b/Tests/IntegrationTests/Database/DatabaseTests.cs
index 69019adeae..2ee68ea1b7 100644
--- a/Tests/IntegrationTests/Database/DatabaseTests.cs
+++ b/Tests/IntegrationTests/Database/DatabaseTests.cs
@@ -49,7 +49,7 @@ public void TestTable()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTable.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTable.");
var testValues = new [] { "TestValue 1", "TestValue 2", "TestValue 3" };
@@ -62,33 +62,33 @@ public void TestTable()
};
var inserted = Database.AddObject(data);
- Assert.IsTrue(inserted, "TestTable Entry not Inserted properly for Value {0}.", values);
+ Assert.That(inserted, Is.True, "TestTable Entry not Inserted properly for Value {0}.", values);
}
var retrieve = Database.SelectAllObjects();
- Assert.AreEqual(testValues.Length, retrieve.Count, "Retrieved Test Table Entries Count is not equals to Test Values Count.");
+ Assert.That(retrieve.Count, Is.EqualTo(testValues.Length), "Retrieved Test Table Entries Count is not equals to Test Values Count.");
- CollectionAssert.AreEquivalent(testValues, retrieve.Select(o => o.TestField), "Retrieved Test Entries and Test Values should be Equivalent.");
- Assert.IsTrue(retrieve.All(o => o.IsPersisted), "All Retrieved Test Entries should be Persisted in database.");
+ Assert.That(retrieve.Select(o => o.TestField), Is.EquivalentTo(testValues), "Retrieved Test Entries and Test Values should be Equivalent.");
+ Assert.That(retrieve.All(o => o.IsPersisted), Is.True, "All Retrieved Test Entries should be Persisted in database.");
// Modify Some Data
var modObj = retrieve.First(o => o.TestField == testValues.First());
modObj.TestField = "TestValue 4";
- Assert.IsTrue(modObj.Dirty, "Test Table Object should be Dirty after Modifications.");
+ Assert.That(modObj.Dirty, Is.True, "Test Table Object should be Dirty after Modifications.");
var saved = Database.SaveObject(modObj);
- Assert.IsTrue(saved, "Test Table Object could not be saved correctly.");
+ Assert.That(saved, Is.True, "Test Table Object could not be saved correctly.");
- Assert.IsFalse(modObj.Dirty, "Test Table Object should not be Dirty after Object Save.");
+ Assert.That(modObj.Dirty, Is.False, "Test Table Object should not be Dirty after Object Save.");
testValues = new [] { modObj.TestField, "TestValue 2", "TestValue 3" };
retrieve = Database.SelectAllObjects();
- CollectionAssert.AreEquivalent(testValues, retrieve.Select(o => o.TestField), "Retrieved Test Entries after Modification should be Equivalent to Test Values.");
+ Assert.That(retrieve.Select(o => o.TestField), Is.EquivalentTo(testValues), "Retrieved Test Entries after Modification should be Equivalent to Test Values.");
// Delete Some Data
@@ -96,32 +96,32 @@ public void TestTable()
var deleted = Database.DeleteObject(delObj);
- Assert.IsTrue(deleted, "Test Table Object could not be deleted correctly.");
- Assert.IsTrue(delObj.IsDeleted, "Test Table Deleted Object does not have delete flags set correctly.");
+ Assert.That(deleted, Is.True, "Test Table Object could not be deleted correctly.");
+ Assert.That(delObj.IsDeleted, Is.True, "Test Table Deleted Object does not have delete flags set correctly.");
testValues = retrieve.Skip(1).Select(o => o.TestField).ToArray();
retrieve = Database.SelectAllObjects();
- CollectionAssert.AreEquivalent(testValues, retrieve.Select(o => o.TestField), "Retrieved Test Entries after Deletion should be Equivalent to Test Values.");
+ Assert.That(retrieve.Select(o => o.TestField), Is.EquivalentTo(testValues), "Retrieved Test Entries after Deletion should be Equivalent to Test Values.");
// Find Object By Key
var keyObject = retrieve.First();
Assert.That(keyObject.ObjectId, Is.Not.Null.Or.Empty, "Test Table Retrieved Object should have an Object Id");
var retrieveKeyObj = Database.FindObjectByKey(keyObject.ObjectId);
- Assert.IsNotNull(retrieveKeyObj, "Test Table Retrieved Object by Key should not be null.");
- Assert.AreEqual(retrieveKeyObj.ObjectId, keyObject.ObjectId, "Test Table Key Object and Retrieved Key Object should have same Object Id.");
- Assert.AreEqual(retrieveKeyObj.TestField, keyObject.TestField, "Test Table Key Object and Retrieved Key Object should have same Values.");
+ Assert.That(retrieveKeyObj, Is.Not.Null, "Test Table Retrieved Object by Key should not be null.");
+ Assert.That(keyObject.ObjectId, Is.EqualTo(retrieveKeyObj.ObjectId), "Test Table Key Object and Retrieved Key Object should have same Object Id.");
+ Assert.That(keyObject.TestField, Is.EqualTo(retrieveKeyObj.TestField), "Test Table Key Object and Retrieved Key Object should have same Values.");
// Find Objects by Key
var keys = retrieve.Take(2).Select(r => r.ObjectId).Append("__bad__id__").ToList();
var retrieveKeyObjects = Database.FindObjectsByKey(keys);
- Assert.IsNotNull(retrieveKeyObjects, "Test Table Retrieved Objects by Key should not be null.");
- Assert.IsTrue(retrieveKeyObjects.Count == 3, "Test Table Retrieved Objects by Key should contains 3 objects");
- Assert.IsTrue(keys.Contains(retrieveKeyObjects[0].ObjectId), "Test Table first Key Object and Retrieved first Key Object should have same Object Id.");
- Assert.IsTrue(keys.Contains(retrieveKeyObjects[1].ObjectId), "Test Table second Key Object and Retrieved second Key Object should have same Object Id.");
- Assert.IsNull(retrieveKeyObjects[2], "Test Table third object should be null (it's an invalid id)");
+ Assert.That(retrieveKeyObjects, Is.Not.Null, "Test Table Retrieved Objects by Key should not be null.");
+ Assert.That(retrieveKeyObjects.Count == 3, Is.True, "Test Table Retrieved Objects by Key should contains 3 objects");
+ Assert.That(keys.Contains(retrieveKeyObjects[0].ObjectId), Is.True, "Test Table first Key Object and Retrieved first Key Object should have same Object Id.");
+ Assert.That(keys.Contains(retrieveKeyObjects[1].ObjectId), Is.True, "Test Table second Key Object and Retrieved second Key Object should have same Object Id.");
+ Assert.That(retrieveKeyObjects[2], Is.Null, "Test Table third object should be null (it's an invalid id)");
}
///
@@ -140,51 +140,51 @@ public void TestTableAutoIncrement()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableAutoInc.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableAutoInc.");
var addObj = new TestTableAutoInc() { TestField = "Test AutoInc" };
// Insert a Test Object for guessing last auto increment
var inserted = Database.AddObject(addObj);
- Assert.IsTrue(inserted, "Test Table Auto Inc could not insert a new Entry.");
+ Assert.That(inserted, Is.True, "Test Table Auto Inc could not insert a new Entry.");
var autoInc = addObj.PrimaryKey;
- Assert.AreNotEqual(autoInc, default(int), "Test Table Auto Inc Primary should not be Default value after insertion.");
+ Assert.That(default(int), Is.Not.EqualTo(autoInc), "Test Table Auto Inc Primary should not be Default value after insertion.");
// Add Another Object to Check Primary Key Increment
var otherObj = new TestTableAutoInc() { TestField = "Test AutoInc Other" };
var otherInsert = Database.AddObject(otherObj);
- Assert.IsTrue(otherInsert, "Test Table Auto Inc could not insert an other Entry.");
+ Assert.That(otherInsert, Is.True, "Test Table Auto Inc could not insert an other Entry.");
var otherAutoInc = otherObj.PrimaryKey;
- Assert.Greater(otherAutoInc, autoInc, "Newly Inserted Test Table Auto Inc Other Entry should have a Greater Primary Key Increment.");
+ Assert.That(otherAutoInc, Is.GreaterThan(autoInc), "Newly Inserted Test Table Auto Inc Other Entry should have a Greater Primary Key Increment.");
// Try Deleting and Re-inserting
var reDeleted = Database.DeleteObject(otherObj);
- Assert.IsTrue(reDeleted, "Test Table Auto Inc could not delete other Entry from Table.");
- Assert.IsTrue(otherObj.IsDeleted, "Test Table Auto Inc other Entry deleted Flag should be true.");
- Assert.IsFalse(otherObj.IsPersisted, "Test Table Auto Inc other Entry Persisted Flag should be false.");
+ Assert.That(reDeleted, Is.True, "Test Table Auto Inc could not delete other Entry from Table.");
+ Assert.That(otherObj.IsDeleted, Is.True, "Test Table Auto Inc other Entry deleted Flag should be true.");
+ Assert.That(otherObj.IsPersisted, Is.False, "Test Table Auto Inc other Entry Persisted Flag should be false.");
otherObj.PrimaryKey = default(int);
var reInserted = Database.AddObject(otherObj);
- Assert.IsTrue(reInserted, "Test Table Auto Inc could not insert other Entry in Table again.");
+ Assert.That(reInserted, Is.True, "Test Table Auto Inc could not insert other Entry in Table again.");
- Assert.Greater(otherObj.PrimaryKey, otherAutoInc, "Re-Added Test Table Auto Inc Entry should have a Greater Primary Key Increment.");
+ Assert.That(otherObj.PrimaryKey, Is.GreaterThan(otherAutoInc), "Re-Added Test Table Auto Inc Entry should have a Greater Primary Key Increment.");
// Try modifying to check that Primary Key is Used for Update Where Clause
otherObj.TestField = "Test AutoInc Other Modified !";
- Assert.IsTrue(otherObj.Dirty, "Test Table Auto Inc Other Object should be Dirty after Modifications.");
+ Assert.That(otherObj.Dirty, Is.True, "Test Table Auto Inc Other Object should be Dirty after Modifications.");
var modified = Database.SaveObject(otherObj);
- Assert.IsTrue(modified, "Test Table Auto Inc Other Object could not be Modified.");
- Assert.IsFalse(otherObj.Dirty, "Test Table Auto Inc Other Object should not be Dirty after save.");
+ Assert.That(modified, Is.True, "Test Table Auto Inc Other Object could not be Modified.");
+ Assert.That(otherObj.Dirty, Is.False, "Test Table Auto Inc Other Object should not be Dirty after save.");
var retrieve = Database.FindObjectByKey(otherObj.PrimaryKey);
- Assert.IsNotNull(retrieve, "Test Table Auto Inc Other Object could not be Retrieved through Primary Key.");
- Assert.AreEqual(otherObj.TestField, retrieve.TestField, "Test Table Auto Inc Retrieved Object is different from Other Object.");
+ Assert.That(retrieve, Is.Not.Null, "Test Table Auto Inc Other Object could not be Retrieved through Primary Key.");
+ Assert.That(retrieve.TestField, Is.EqualTo(otherObj.TestField), "Test Table Auto Inc Retrieved Object is different from Other Object.");
}
///
@@ -203,28 +203,28 @@ public void TestTableUnique()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableUniqueField.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableUniqueField.");
// Test Add
var uniqueObj = new TestTableUniqueField { TestField = "Test Value Unique", Unique = 1 };
var inserted = Database.AddObject(uniqueObj);
- Assert.IsTrue(inserted, "Test Table Unique Field could not insert unique object.");
+ Assert.That(inserted, Is.True, "Test Table Unique Field could not insert unique object.");
// Try Adding with unique Value
var otherUniqueObj = new TestTableUniqueField { TestField = "Test Value Other Unique", Unique = 1 };
var otherInserted = Database.AddObject(otherUniqueObj);
- Assert.IsFalse(otherInserted, "Test Table Unique Field with Other Object violating unique constraint should not be inserted.");
+ Assert.That(otherInserted, Is.False, "Test Table Unique Field with Other Object violating unique constraint should not be inserted.");
// Try Adding with non unique Value
var otherNonUniqueObj = new TestTableUniqueField { TestField = "Test Value Other Non-Unique", Unique = 2 };
var nonUniqueInserted = Database.AddObject(otherNonUniqueObj);
- Assert.IsTrue(nonUniqueInserted, "Test Table Unique Field with Other Non Unique Object could not be inserted");
+ Assert.That(nonUniqueInserted, Is.True, "Test Table Unique Field with Other Non Unique Object could not be inserted");
// Try saving with unique Value
var retrieved = Database.FindObjectByKey(otherNonUniqueObj.ObjectId);
@@ -233,16 +233,16 @@ public void TestTableUnique()
var saved = Database.SaveObject(retrieved);
- Assert.IsFalse(saved, "Test Table Unique Field with Retrieved Object violating unique constraint should not be saved.");
+ Assert.That(saved, Is.False, "Test Table Unique Field with Retrieved Object violating unique constraint should not be saved.");
// Delete Previous Unique and Try Reinsert.
var deleted = Database.DeleteObject(uniqueObj);
- Assert.IsTrue(deleted, "Test Table Unique Field could not delete unique object.");
- Assert.IsTrue(uniqueObj.IsDeleted, "Test Table Unique Field unique object should have delete flag set.");
+ Assert.That(deleted, Is.True, "Test Table Unique Field could not delete unique object.");
+ Assert.That(uniqueObj.IsDeleted, Is.True, "Test Table Unique Field unique object should have delete flag set.");
var retrievedSaved = Database.SaveObject(retrieved);
- Assert.IsTrue(retrievedSaved, "Test Table Unique Field Retrieved Object could not be inserted after deleting previous constraint violating object.");
+ Assert.That(retrievedSaved, Is.True, "Test Table Unique Field Retrieved Object could not be inserted after deleting previous constraint violating object.");
}
///
@@ -261,27 +261,27 @@ public void TestTableMultiUnique()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableMultiUnique.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableMultiUnique.");
// Test Add
var uniqueObj = new TestTableMultiUnique { StrUniquePart = "Test Value Unique", IntUniquePart = 1 };
var inserted = Database.AddObject(uniqueObj);
- Assert.IsTrue(inserted, "Test Table Unique Multiple Field could not insert unique object.");
+ Assert.That(inserted, Is.True, "Test Table Unique Multiple Field could not insert unique object.");
// Try Adding with unique Value
var otherUniqueObj = new TestTableMultiUnique { StrUniquePart = "Test Value Unique", IntUniquePart = 1 };
var otherInserted = Database.AddObject(otherUniqueObj);
- Assert.IsFalse(otherInserted, "Test Table Unique Multiple Field with Other Object violating unique constraint should not be inserted.");
+ Assert.That(otherInserted, Is.False, "Test Table Unique Multiple Field with Other Object violating unique constraint should not be inserted.");
// Try Adding with non unique Value
var otherNonUniqueObj = new TestTableMultiUnique { StrUniquePart = "Test Value Other Non-Unique", IntUniquePart = 2 };
var nonUniqueInserted = Database.AddObject(otherNonUniqueObj);
- Assert.IsTrue(nonUniqueInserted, "Test Table Unique Multiple Field with Other Non Unique Object could not be inserted");
+ Assert.That(nonUniqueInserted, Is.True, "Test Table Unique Multiple Field with Other Non Unique Object could not be inserted");
// Try saving with unique Value
var retrieved = Database.FindObjectByKey(otherNonUniqueObj.ObjectId);
@@ -291,16 +291,16 @@ public void TestTableMultiUnique()
var saved = Database.SaveObject(retrieved);
- Assert.IsFalse(saved, "Test Table Unique Multiple Field with Retrieved Object violating unique constraint should not be saved.");
+ Assert.That(saved, Is.False, "Test Table Unique Multiple Field with Retrieved Object violating unique constraint should not be saved.");
// Delete Previous Unique and Try Reinsert.
var deleted = Database.DeleteObject(uniqueObj);
- Assert.IsTrue(deleted, "Test Table Unique Field could not delete unique object.");
- Assert.IsTrue(uniqueObj.IsDeleted, "Test Table Unique Field unique object should have delete flag set.");
+ Assert.That(deleted, Is.True, "Test Table Unique Field could not delete unique object.");
+ Assert.That(uniqueObj.IsDeleted, Is.True, "Test Table Unique Field unique object should have delete flag set.");
var retrievedSaved = Database.SaveObject(retrieved);
- Assert.IsTrue(retrievedSaved, "Test Table Unique Field Retrieved Object could not be inserted after deleting previous constraint violating object.");
+ Assert.That(retrievedSaved, Is.True, "Test Table Unique Field Retrieved Object could not be inserted after deleting previous constraint violating object.");
}
///
@@ -320,7 +320,7 @@ public void TestTableRelation()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableRelationEntry.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableRelationEntry.");
var allrel = Database.SelectAllObjects();
@@ -329,66 +329,66 @@ public void TestTableRelation()
var nonerel = Database.SelectAllObjects();
- Assert.IsEmpty(nonerel, "Database shouldn't have any record For TestTableRelation.");
+ Assert.That(nonerel, Is.Empty, "Database shouldn't have any record For TestTableRelation.");
// Try Add with no Relation
var noRelObj = new TestTableRelation() { TestField = "RelationTestValue" };
var inserted = Database.AddObject(noRelObj);
- Assert.IsTrue(inserted, "Test Table Relation could not insert object with no relation.");
- Assert.IsNull(noRelObj.Entry, "Test Table Relation object with no relation should have null Entry.");
+ Assert.That(inserted, Is.True, "Test Table Relation could not insert object with no relation.");
+ Assert.That(noRelObj.Entry, Is.Null, "Test Table Relation object with no relation should have null Entry.");
// Try Select
var selectInserted = Database.SelectAllObjects();
- CollectionAssert.IsNotEmpty(selectInserted, "Test Table Relation could not retrieve objects without relation.");
+ Assert.That(selectInserted, Is.Not.Empty, "Test Table Relation could not retrieve objects without relation.");
// Try Adding Relation
var relObj = new TestTableRelationEntry() { TestField = "RelationEntryTestValue", ObjectId = noRelObj.ObjectId };
var relInserted = Database.AddObject(relObj);
- Assert.IsTrue(relInserted, "Test Table Relation Entry could not be inserted.");
+ Assert.That(relInserted, Is.True, "Test Table Relation Entry could not be inserted.");
noRelObj.Entry = relObj;
var saved = Database.SaveObject(noRelObj);
- Assert.IsTrue(saved, "Test Table Relation could not save Object with a new relation Added.");
+ Assert.That(saved, Is.True, "Test Table Relation could not save Object with a new relation Added.");
// Try Retrieving Relation
var retrieve = Database.FindObjectByKey(noRelObj.ObjectId);
- Assert.IsNotNull(retrieve, "Test Table Relation could not retrieve relation object by ObjectId.");
- Assert.IsNotNull(retrieve.Entry, "Test Table Relation retrieved object have no entry object.");
- Assert.AreEqual(relObj.TestField, retrieve.Entry.TestField, "Test Table Relation retrieved object Entry Relation is different from created object.");
+ Assert.That(retrieve, Is.Not.Null, "Test Table Relation could not retrieve relation object by ObjectId.");
+ Assert.That(retrieve.Entry, Is.Not.Null, "Test Table Relation retrieved object have no entry object.");
+ Assert.That(retrieve.Entry.TestField, Is.EqualTo(relObj.TestField), "Test Table Relation retrieved object Entry Relation is different from created object.");
// Try Deleting Relation
var deleted = Database.DeleteObject(noRelObj);
- Assert.IsTrue(deleted, "Test Table Relation could not delete object with relation.");
- Assert.IsTrue(noRelObj.IsDeleted, "Test Table Relation deleted object should have deleted flag set.");
- Assert.IsTrue(noRelObj.Entry.IsDeleted, "Test Table Relation deleted object Entry should have deleted flag set.");
+ Assert.That(deleted, Is.True, "Test Table Relation could not delete object with relation.");
+ Assert.That(noRelObj.IsDeleted, Is.True, "Test Table Relation deleted object should have deleted flag set.");
+ Assert.That(noRelObj.Entry.IsDeleted, Is.True, "Test Table Relation deleted object Entry should have deleted flag set.");
// Check that Relation was deleted
var relRetrieve = Database.FindObjectByKey(relObj.ObjectId);
- Assert.IsNull(relRetrieve, "Test Table Relation Entry was not auto deleted with relation object.");
- Assert.IsTrue(relObj.IsDeleted, "Test Table Relation Entry should have deleted flag set after auto delete.");
+ Assert.That(relRetrieve, Is.Null, "Test Table Relation Entry was not auto deleted with relation object.");
+ Assert.That(relObj.IsDeleted, Is.True, "Test Table Relation Entry should have deleted flag set after auto delete.");
// Check Null Relation
var nullObj = new TestTableRelation() { TestField = "RelationNullTestValue" };
var nullAdded = Database.AddObject(nullObj);
- Assert.IsTrue(nullAdded, "Test Table Relation need an object for the Null Relation Test.");
+ Assert.That(nullAdded, Is.True, "Test Table Relation need an object for the Null Relation Test.");
nullObj.ObjectId = null;
nullObj.Entry = new TestTableRelationEntry() { TestField = "RelationEntryNullTestValue" };
Database.FillObjectRelations(nullObj);
- Assert.IsNull(nullObj.Entry, "Test Table Relation should not have entry with null local value.");
+ Assert.That(nullObj.Entry, Is.Null, "Test Table Relation should not have entry with null local value.");
// Check Allow Add Restriction
var allowAddRestriction = new TestTableRelation() { TestField = "RelationTestValueAllowAddRestriction" };
@@ -397,33 +397,33 @@ public void TestTableRelation()
var restrictionAdded = Database.AddObject(allowAddRestriction);
- Assert.IsFalse(restrictionAdded, "Test Table Relation should return error when relation failed saving.");
- Assert.IsTrue(allowAddRestriction.IsPersisted, "Test Table Relation should be persisted in database.");
- Assert.IsFalse(allowAddRestriction.Entry.IsPersisted, "Test Table Relation Entry should not be persisted if AllowAdd Restriction is in place.");
+ Assert.That(restrictionAdded, Is.False, "Test Table Relation should return error when relation failed saving.");
+ Assert.That(allowAddRestriction.IsPersisted, Is.True, "Test Table Relation should be persisted in database.");
+ Assert.That(allowAddRestriction.Entry.IsPersisted, Is.False, "Test Table Relation Entry should not be persisted if AllowAdd Restriction is in place.");
// Check Dirty Restriction
allowAddRestriction.Entry.AllowAdd = true;
var restrictionSaved = Database.SaveObject(allowAddRestriction);
- Assert.IsTrue(restrictionSaved, "Test Table Relation restriction test should have the restricted object seved to database.");
- Assert.IsTrue(allowAddRestriction.Entry.IsPersisted, "Test Table Relation Entry restriction test should be persisted.");
+ Assert.That(restrictionSaved, Is.True, "Test Table Relation restriction test should have the restricted object seved to database.");
+ Assert.That(allowAddRestriction.Entry.IsPersisted, Is.True, "Test Table Relation Entry restriction test should be persisted.");
- Assert.IsFalse(allowAddRestriction.Dirty, "Test Table Relation restriction object should not have Dirty flag after saving.");
+ Assert.That(allowAddRestriction.Dirty, Is.False, "Test Table Relation restriction object should not have Dirty flag after saving.");
var modifiedText = "RelationEntryTestValueAllowAddRestrictionModified";
allowAddRestriction.Entry.TestField = modifiedText;
allowAddRestriction.Entry.Dirty = false;
- Assert.IsFalse(allowAddRestriction.Entry.Dirty, "Test Table Relation Entry need to have its Dirty flag off for this Test.");
+ Assert.That(allowAddRestriction.Entry.Dirty, Is.False, "Test Table Relation Entry need to have its Dirty flag off for this Test.");
var modifySaved = Database.SaveObject(allowAddRestriction);
- Assert.IsTrue(modifySaved, "Test Table Relation should be saved correctly with Dirty flag off.");
+ Assert.That(modifySaved, Is.True, "Test Table Relation should be saved correctly with Dirty flag off.");
Database.FillObjectRelations(allowAddRestriction);
- Assert.AreNotEqual(modifiedText, allowAddRestriction.Entry.TestField, "Test Table Relation Entry should not have been saved with modified text.");
+ Assert.That(allowAddRestriction.Entry.TestField, Is.Not.EqualTo(modifiedText), "Test Table Relation Entry should not have been saved with modified text.");
// Check Allow Delete Restriction
var restrictionEntry = allowAddRestriction.Entry;
@@ -431,10 +431,10 @@ public void TestTableRelation()
var restrictionDeleted = Database.DeleteObject(allowAddRestriction);
- Assert.IsFalse(restrictionDeleted, "Test Table Relation should not be deleted correctly.");
- Assert.IsTrue(restrictionEntry.IsPersisted, "Test Table Relation Entry should still be Persisted.");
- Assert.IsFalse(restrictionEntry.IsDeleted, "Test Table Relation Entry should not be deleted.");
- Assert.IsFalse(allowAddRestriction.IsPersisted, "Test Table Relation object should not be persisted.");
+ Assert.That(restrictionDeleted, Is.False, "Test Table Relation should not be deleted correctly.");
+ Assert.That(restrictionEntry.IsPersisted, Is.True, "Test Table Relation Entry should still be Persisted.");
+ Assert.That(restrictionEntry.IsDeleted, Is.False, "Test Table Relation Entry should not be deleted.");
+ Assert.That(allowAddRestriction.IsPersisted, Is.False, "Test Table Relation object should not be persisted.");
}
///
@@ -454,7 +454,7 @@ public void TestTableRelations()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableRelationsEntries.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableRelationsEntries.");
var allrel = Database.SelectAllObjects();
@@ -463,19 +463,19 @@ public void TestTableRelations()
var nonerel = Database.SelectAllObjects();
- Assert.IsEmpty(nonerel, "Database shouldn't have any record For TestTableRelations.");
+ Assert.That(nonerel, Is.Empty, "Database shouldn't have any record For TestTableRelations.");
// Try Add With no Relation
var noRelObj = new TestTableRelations() { TestField = "RelationsTestValue" };
var inserted = Database.AddObject(noRelObj);
- Assert.IsTrue(inserted, "Test Table Relations could not insert object with no relation.");
- Assert.IsNull(noRelObj.Entries, "Test Table Relations object with no relation should have null Entry.");
+ Assert.That(inserted, Is.True, "Test Table Relations could not insert object with no relation.");
+ Assert.That(noRelObj.Entries, Is.Null, "Test Table Relations object with no relation should have null Entry.");
// Try Selecting
var selectInserted = Database.SelectAllObjects();
- CollectionAssert.IsNotEmpty(selectInserted, "Test Table Relations could not retrieve objects without relation.");
+ Assert.That(selectInserted, Is.Not.Empty, "Test Table Relations could not retrieve objects without relation.");
// Try Adding Relation
var testValues = new[] { "RelationsEntriesTestValue 1", "RelationsEntriesTestValue 2", "RelationsEntriesTestValue 3" };
@@ -484,48 +484,48 @@ public void TestTableRelations()
var relInserted = relObjs.Select(o => Database.AddObject(o)).ToArray();
- Assert.IsTrue(relInserted.All(res => res), "Test Table Relations Entries could not be inserted.");
+ Assert.That(relInserted.All(res => res), Is.True, "Test Table Relations Entries could not be inserted.");
noRelObj.Entries = relObjs;
var saved = Database.SaveObject(noRelObj);
- Assert.IsTrue(saved, "Test Table Relations could not save Object with a new relations Added.");
+ Assert.That(saved, Is.True, "Test Table Relations could not save Object with a new relations Added.");
// Try Retrieving Relation
var retrieve = Database.FindObjectByKey(noRelObj.ObjectId);
- Assert.IsNotNull(retrieve, "Test Table Relations could not retrieve relations object by ObjectId.");
- Assert.IsNotNull(retrieve.Entries, "Test Table Relations retrieved object have no entries objects.");
- CollectionAssert.AreEquivalent(testValues, retrieve.Entries.Select(o => o.TestField),
+ Assert.That(retrieve, Is.Not.Null, "Test Table Relations could not retrieve relations object by ObjectId.");
+ Assert.That(retrieve.Entries, Is.Not.Null, "Test Table Relations retrieved object have no entries objects.");
+ Assert.That(retrieve.Entries.Select(o => o.TestField), Is.EquivalentTo(testValues),
"Test Table Relations retrieved objects Entries Relation are different from created objects.");
// Try Deleting Relation
var deleted = Database.DeleteObject(noRelObj);
- Assert.IsTrue(deleted, "Test Table Relations could not delete object with relations.");
- Assert.IsTrue(noRelObj.IsDeleted, "Test Table Relations deleted object should have deleted flag set.");
- Assert.IsTrue(noRelObj.Entries.All(ent => ent.IsDeleted), "Test Table Relations deleted object should have all Entries with deleted flag set.");
+ Assert.That(deleted, Is.True, "Test Table Relations could not delete object with relations.");
+ Assert.That(noRelObj.IsDeleted, Is.True, "Test Table Relations deleted object should have deleted flag set.");
+ Assert.That(noRelObj.Entries.All(ent => ent.IsDeleted), Is.True, "Test Table Relations deleted object should have all Entries with deleted flag set.");
// Check that Relation was deleted
var relRetrieve = Database.SelectAllObjects().Where(o => o.ForeignTestField == noRelObj.ObjectId);
- Assert.IsEmpty(relRetrieve, "Test Table Relations Entries were not auto deleted with relations object.");
- Assert.IsTrue(relObjs.All(o => o.IsDeleted), "Test Table Relations Entries should have deleted flags set after auto delete.");
+ Assert.That(relRetrieve, Is.Empty, "Test Table Relations Entries were not auto deleted with relations object.");
+ Assert.That(relObjs.All(o => o.IsDeleted), Is.True, "Test Table Relations Entries should have deleted flags set after auto delete.");
// Check Null Relation
var nullObj = new TestTableRelations() { TestField = "RelationsNullTestValue" };
var nullAdded = Database.AddObject(nullObj);
- Assert.IsTrue(nullAdded, "Test Table Relations need an object for the Null Relation Test.");
+ Assert.That(nullAdded, Is.True, "Test Table Relations need an object for the Null Relation Test.");
nullObj.ObjectId = null;
nullObj.Entries = Array.Empty();
Database.FillObjectRelations(nullObj);
- Assert.IsNull(nullObj.Entries, "Test Table Relations should have null entries with null local value.");
+ Assert.That(nullObj.Entries, Is.Null, "Test Table Relations should have null entries with null local value.");
// Check Allow Add Restriction
var allowAddRestriction = new TestTableRelations() { TestField = "RelationTestValueAllowAddRestriction" };
@@ -534,34 +534,34 @@ public void TestTableRelations()
var restrictionAdded = Database.AddObject(allowAddRestriction);
- Assert.IsFalse(restrictionAdded, "Test Table Relations should return false when missing relation adding.");
- Assert.IsTrue(allowAddRestriction.IsPersisted, "Test Table Relations should be persisted.");
+ Assert.That(restrictionAdded, Is.False, "Test Table Relations should return false when missing relation adding.");
+ Assert.That(allowAddRestriction.IsPersisted, Is.True, "Test Table Relations should be persisted.");
- Assert.IsFalse(allowAddRestriction.Entries[0].IsPersisted, "Test Table Relations Entries should not be persisted if AllowAdd Restriction is in place.");
+ Assert.That(allowAddRestriction.Entries[0].IsPersisted, Is.False, "Test Table Relations Entries should not be persisted if AllowAdd Restriction is in place.");
// Check Dirty Restriction
allowAddRestriction.Entries[0].AllowAdd = true;
var restrictionSaved = Database.SaveObject(allowAddRestriction);
- Assert.IsTrue(restrictionSaved, "Test Table Relations restriction test should have the restricted object seved to database.");
- Assert.IsTrue(allowAddRestriction.Entries[0].IsPersisted, "Test Table Relations Entries restriction test should be persisted.");
+ Assert.That(restrictionSaved, Is.True, "Test Table Relations restriction test should have the restricted object seved to database.");
+ Assert.That(allowAddRestriction.Entries[0].IsPersisted, Is.True, "Test Table Relations Entries restriction test should be persisted.");
- Assert.IsFalse(allowAddRestriction.Dirty, "Test Table Relations restriction object should not have Dirty flag after saving.");
+ Assert.That(allowAddRestriction.Dirty, Is.False, "Test Table Relations restriction object should not have Dirty flag after saving.");
var modifiedText = "RelationEntryTestValueAllowAddRestrictionModified";
allowAddRestriction.Entries[0].TestField = modifiedText;
allowAddRestriction.Entries[0].Dirty = false;
- Assert.IsFalse(allowAddRestriction.Entries[0].Dirty, "Test Table Relations Entries need to have its Dirty flag off for this Test.");
+ Assert.That(allowAddRestriction.Entries[0].Dirty, Is.False, "Test Table Relations Entries need to have its Dirty flag off for this Test.");
var modifySaved = Database.SaveObject(allowAddRestriction);
- Assert.IsTrue(modifySaved, "Test Table Relations should be saved correctly with Dirty flag off.");
+ Assert.That(modifySaved, Is.True, "Test Table Relations should be saved correctly with Dirty flag off.");
Database.FillObjectRelations(allowAddRestriction);
- Assert.AreNotEqual(modifiedText, allowAddRestriction.Entries[0].TestField, "Test Table Relations Entries should not have been saved with modified text.");
+ Assert.That(allowAddRestriction.Entries[0].TestField, Is.Not.EqualTo(modifiedText), "Test Table Relations Entries should not have been saved with modified text.");
// Check Allow Delete Restriction
var restrictionEntry = allowAddRestriction.Entries[0];
@@ -569,10 +569,10 @@ public void TestTableRelations()
var restrictionDeleted = Database.DeleteObject(allowAddRestriction);
- Assert.IsFalse(restrictionDeleted, "Test Table Relations should not be deleted correctly.");
- Assert.IsTrue(restrictionEntry.IsPersisted, "Test Table Relations Entries should still be Persisted.");
- Assert.IsFalse(restrictionEntry.IsDeleted, "Test Table Relations Entries should not be deleted.");
- Assert.IsFalse(allowAddRestriction.IsPersisted, "Test Table Relations object should not be persisted.");
+ Assert.That(restrictionDeleted, Is.False, "Test Table Relations should not be deleted correctly.");
+ Assert.That(restrictionEntry.IsPersisted, Is.True, "Test Table Relations Entries should still be Persisted.");
+ Assert.That(restrictionEntry.IsDeleted, Is.False, "Test Table Relations Entries should not be deleted.");
+ Assert.That(allowAddRestriction.IsPersisted, Is.False, "Test Table Relations object should not be persisted.");
}
///
@@ -591,7 +591,7 @@ public void TestTableRelationsNoAutoload()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableRelationsEntries.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableRelationsEntries.");
var allrel = Database.SelectAllObjects();
@@ -599,15 +599,15 @@ public void TestTableRelationsNoAutoload()
var nonerel = Database.SelectAllObjects();
- Assert.IsEmpty(nonerel, "Database shouldn't have any record For TestTableRelationsWithNoAutoLoad.");
+ Assert.That(nonerel, Is.Empty, "Database shouldn't have any record For TestTableRelationsWithNoAutoLoad.");
// Try Add With no Relation
var noRelObj = new TestTableRelationsWithNoAutoLoad() { TestField = "RelationsTestValue" };
var inserted = Database.AddObject(noRelObj);
- Assert.IsTrue(inserted, "Test Table Relations (NoAutoLoad) could not insert object with no relation.");
- Assert.IsNull(noRelObj.Entries, "Test Table Relations (NoAutoLoad) object with no relation should have null Entry.");
+ Assert.That(inserted, Is.True, "Test Table Relations (NoAutoLoad) could not insert object with no relation.");
+ Assert.That(noRelObj.Entries, Is.Null, "Test Table Relations (NoAutoLoad) object with no relation should have null Entry.");
// Try Adding Relation
var testValues = new[] { "RelationsEntriesTestValue 1", "RelationsEntriesTestValue 2", "RelationsEntriesTestValue 3" };
@@ -616,24 +616,24 @@ public void TestTableRelationsNoAutoload()
var relInserted = Database.AddObject(relObjs);
- Assert.IsTrue(relInserted, "Test Table Relations Entries could not be inserted.");
+ Assert.That(relInserted, Is.True, "Test Table Relations Entries could not be inserted.");
noRelObj.Entries = relObjs;
var saved = Database.SaveObject(noRelObj);
- Assert.IsTrue(saved, "Test Table Relations (NoAutoLoad) could not save Object with a new relations Added.");
+ Assert.That(saved, Is.True, "Test Table Relations (NoAutoLoad) could not save Object with a new relations Added.");
// Try Retrieving Relation
var retrieve = Database.FindObjectByKey(noRelObj.ObjectId);
- Assert.IsNotNull(retrieve, "Test Table Relations (NoAutoLoad) could not retrieve relations object by ObjectId.");
- Assert.IsNull(retrieve.Entries, "Test Table Relations (NoAutoLoad) retrieved object should not have entries objects.");
+ Assert.That(retrieve, Is.Not.Null, "Test Table Relations (NoAutoLoad) could not retrieve relations object by ObjectId.");
+ Assert.That(retrieve.Entries, Is.Null, "Test Table Relations (NoAutoLoad) retrieved object should not have entries objects.");
Database.FillObjectRelations(retrieve);
- Assert.IsNotNull(retrieve.Entries, "Test Table Relations (NoAutoLoad) retrieved object should have entries objects after filling.");
+ Assert.That(retrieve.Entries, Is.Not.Null, "Test Table Relations (NoAutoLoad) retrieved object should have entries objects after filling.");
- CollectionAssert.AreEquivalent(testValues, retrieve.Entries.Select(o => o.TestField),
+ Assert.That(retrieve.Entries.Select(o => o.TestField), Is.EquivalentTo(testValues),
"Test Table Relations (NoAutoLoad) retrieved objects Entries Relation are different from created objects.");
var changedRel = Database.FindObjectByKey(retrieve.Entries[0].ObjectId);
@@ -642,25 +642,25 @@ public void TestTableRelationsNoAutoload()
var resaved = Database.SaveObject(changedRel);
- Assert.IsTrue(resaved, "Changed Relation (NoAutoLoad) could not be saved to database...");
+ Assert.That(resaved, Is.True, "Changed Relation (NoAutoLoad) could not be saved to database...");
var newTestValues = new[] { changedRel.TestField, retrieve.Entries[1].TestField, retrieve.Entries[2].TestField };
Database.FillObjectRelations(retrieve);
- CollectionAssert.AreEquivalent(newTestValues, retrieve.Entries.Select(obj => obj.TestField), "Test Table Relations (NoAutoLoad) refreshed objects Entries Relation are different from changed objects.");
+ Assert.That(retrieve.Entries.Select(obj => obj.TestField), Is.EquivalentTo(newTestValues), "Test Table Relations (NoAutoLoad) refreshed objects Entries Relation are different from changed objects.");
// Try Deleting Relation
var deleted = Database.DeleteObject(noRelObj);
- Assert.IsTrue(deleted, "Test Table Relations (NoAutoLoad) could not delete object with relations.");
- Assert.IsTrue(noRelObj.IsDeleted, "Test Table Relations (NoAutoLoad) deleted object should have deleted flag set.");
+ Assert.That(deleted, Is.True, "Test Table Relations (NoAutoLoad) could not delete object with relations.");
+ Assert.That(noRelObj.IsDeleted, Is.True, "Test Table Relations (NoAutoLoad) deleted object should have deleted flag set.");
// Check that Relations were deleted
var relRetrieve = Database.SelectAllObjects().Where(o => o.ForeignTestField == noRelObj.ObjectId);
- Assert.IsEmpty(relRetrieve, "Test Table Relations (NoAutoLoad) Entries were not auto deleted with relations object.");
- Assert.IsTrue(relObjs.All(o => o.IsDeleted), "Test Table Relations (NoAutoLoad) Entries should have deleted flags set after auto delete.");
+ Assert.That(relRetrieve, Is.Empty, "Test Table Relations (NoAutoLoad) Entries were not auto deleted with relations object.");
+ Assert.That(relObjs.All(o => o.IsDeleted), Is.True, "Test Table Relations (NoAutoLoad) Entries should have deleted flags set after auto delete.");
}
///
@@ -679,7 +679,7 @@ public void TestTableRelationsWithNoAutoDelete()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableRelationsEntries.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableRelationsEntries.");
var allrel = Database.SelectAllObjects();
@@ -687,7 +687,7 @@ public void TestTableRelationsWithNoAutoDelete()
var nonerel = Database.SelectAllObjects();
- Assert.IsEmpty(nonerel, "Database shouldn't have any record For TestTableRelationsWithNoAutoDelete.");
+ Assert.That(nonerel, Is.Empty, "Database shouldn't have any record For TestTableRelationsWithNoAutoDelete.");
// Add Relation Object
var relObj = new TestTableRelationsWithNoAutoDelete() { TestField = "RelationsTestValue NoAutoDelete" };
@@ -697,27 +697,27 @@ public void TestTableRelationsWithNoAutoDelete()
var inserted = Database.AddObject(relObj);
- Assert.IsTrue(inserted, "Test Table Relations (NoAutoDelete) could not insert object with no relation.");
+ Assert.That(inserted, Is.True, "Test Table Relations (NoAutoDelete) could not insert object with no relation.");
// Try Retrieving Relation
var retrieve = Database.FindObjectByKey(relObj.ObjectId);
- Assert.IsNotNull(retrieve, "Test Table Relations (NoAutoDelete) could not retrieve relations object by ObjectId.");
- Assert.IsNotEmpty(retrieve.Entries, "Test Table Relations (NoAutoDelete) retrieved object should have entries objects.");
- CollectionAssert.AreEquivalent(testValues, retrieve.Entries.Select(obj => obj.TestField), "Test Table Relations (NoAutoDelete) retrieved object Entries should have same values as created.");
+ Assert.That(retrieve, Is.Not.Null, "Test Table Relations (NoAutoDelete) could not retrieve relations object by ObjectId.");
+ Assert.That(retrieve.Entries, Is.Not.Empty, "Test Table Relations (NoAutoDelete) retrieved object should have entries objects.");
+ Assert.That(retrieve.Entries.Select(obj => obj.TestField), Is.EquivalentTo(testValues), "Test Table Relations (NoAutoDelete) retrieved object Entries should have same values as created.");
// Try Deleting Relation
var deleted = Database.DeleteObject(relObj);
- Assert.IsTrue(deleted, "Test Table Relations (NoAutoDelete) could not delete object with relations.");
- Assert.IsTrue(relObj.IsDeleted, "Test Table Relations (NoAutoDelete) deleted object should have deleted flag set.");
+ Assert.That(deleted, Is.True, "Test Table Relations (NoAutoDelete) could not delete object with relations.");
+ Assert.That(relObj.IsDeleted, Is.True, "Test Table Relations (NoAutoDelete) deleted object should have deleted flag set.");
// Check that Relation were not deleted
var relRetrieve = Database.SelectAllObjects().Where(o => o.ForeignTestField == relObj.ObjectId);
- Assert.IsNotEmpty(relRetrieve, "Test Table Relations (NoAutoDelete) Entries should not be auto deleted with relations object.");
- Assert.IsTrue(relObj.Entries.All(o => !o.IsDeleted), "Test Table Relations (NoAutoDelete) Entries should not have deleted flags set after delete.");
- CollectionAssert.AreEquivalent(testValues, relRetrieve.Select(obj => obj.TestField), "Test Table Relations (NoAutoDelete) Entries should have the same element as created.");
+ Assert.That(relRetrieve, Is.Not.Empty, "Test Table Relations (NoAutoDelete) Entries should not be auto deleted with relations object.");
+ Assert.That(relObj.Entries.All(o => !o.IsDeleted), Is.True, "Test Table Relations (NoAutoDelete) Entries should not have deleted flags set after delete.");
+ Assert.That(relRetrieve.Select(obj => obj.TestField), Is.EquivalentTo(testValues), "Test Table Relations (NoAutoDelete) Entries should have the same element as created.");
}
///
@@ -736,28 +736,28 @@ public void TestTablePrimaryKey()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableUniqueField.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableUniqueField.");
// Test Add
var uniqueObj = new TestTablePrimaryKey { TestField = "Test Value", PrimaryKey = "Key1" };
var inserted = Database.AddObject(uniqueObj);
- Assert.IsTrue(inserted, "Test Table Primary Key could not insert unique key object.");
+ Assert.That(inserted, Is.True, "Test Table Primary Key could not insert unique key object.");
// Try Adding with unique Value
var otherUniqueObj = new TestTablePrimaryKey { TestField = "Test Value Other", PrimaryKey = "Key1" };
var otherInserted = Database.AddObject(otherUniqueObj);
- Assert.IsFalse(otherInserted, "Test Table Primary Key with Other Object violating key constraint should not be inserted.");
+ Assert.That(otherInserted, Is.False, "Test Table Primary Key with Other Object violating key constraint should not be inserted.");
// Try Adding with non unique Value
var otherNonUniqueObj = new TestTablePrimaryKey { TestField = "Test Value Other Non-Primary", PrimaryKey = "Key2" };
var nonUniqueInserted = Database.AddObject(otherNonUniqueObj);
- Assert.IsTrue(nonUniqueInserted, "Test Table Primary Key with Other Non Unique Key could not be inserted");
+ Assert.That(nonUniqueInserted, Is.True, "Test Table Primary Key with Other Non Unique Key could not be inserted");
// Try saving with unique Value
var retrieved = Database.FindObjectByKey(otherNonUniqueObj.PrimaryKey);
@@ -767,16 +767,16 @@ public void TestTablePrimaryKey()
var saved = Database.SaveObject(retrieved);
- Assert.IsFalse(saved, "Test Table Primary Key with Retrieved Object violating key constraint should not be saved.");
+ Assert.That(saved, Is.False, "Test Table Primary Key with Retrieved Object violating key constraint should not be saved.");
// Delete Previous Unique and Try Reinsert.
var deleted = Database.DeleteObject(uniqueObj);
- Assert.IsTrue(deleted, "Test Table Primary Key could not delete unique key object.");
- Assert.IsTrue(uniqueObj.IsDeleted, "Test Table Primary Key unique key object should have delete flag set.");
+ Assert.That(deleted, Is.True, "Test Table Primary Key could not delete unique key object.");
+ Assert.That(uniqueObj.IsDeleted, Is.True, "Test Table Primary Key unique key object should have delete flag set.");
var retrievedSaved = Database.SaveObject(retrieved);
- Assert.IsTrue(retrievedSaved, "Test Table Primary Key Retrieved Object could not be inserted after deleting previous constraint violating object.");
+ Assert.That(retrievedSaved, Is.True, "Test Table Primary Key Retrieved Object could not be inserted after deleting previous constraint violating object.");
}
///
@@ -794,28 +794,28 @@ public void TestTablePrimaryKeyWithUnique()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTablePrimaryKeyUnique.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTablePrimaryKeyUnique.");
// Test Add
var uniqueObj = new TestTablePrimaryKeyUnique { TestField = "Test Value", PrimaryKey = "Key1", Unique = "Unique" };
var inserted = Database.AddObject(uniqueObj);
- Assert.IsTrue(inserted, "Test Table Primary Key With Unique could not insert unique key object.");
+ Assert.That(inserted, Is.True, "Test Table Primary Key With Unique could not insert unique key object.");
// Try Adding with unique Value
var otherUniqueObj = new TestTablePrimaryKeyUnique { TestField = "Test Value Other", PrimaryKey = "Key1", Unique = "Unique" };
var otherInserted = Database.AddObject(otherUniqueObj);
- Assert.IsFalse(otherInserted, "Test Table Primary Key With Unique with Other Object violating key constraint should not be inserted.");
+ Assert.That(otherInserted, Is.False, "Test Table Primary Key With Unique with Other Object violating key constraint should not be inserted.");
// Try Adding with non unique Value
var otherNonUniqueObj = new TestTablePrimaryKeyUnique { TestField = "Test Value Other Non-Primary", PrimaryKey = "Key2", Unique = "NonUnique" };
var nonUniqueInserted = Database.AddObject(otherNonUniqueObj);
- Assert.IsTrue(nonUniqueInserted, "Test Table Primary Key With Unique with Other Non Unique Key could not be inserted");
+ Assert.That(nonUniqueInserted, Is.True, "Test Table Primary Key With Unique with Other Non Unique Key could not be inserted");
// Try saving with unique Value
var retrieved = Database.FindObjectByKey(otherNonUniqueObj.PrimaryKey);
@@ -824,16 +824,16 @@ public void TestTablePrimaryKeyWithUnique()
var saved = Database.SaveObject(retrieved);
- Assert.IsFalse(saved, "Test Table Primary Key With Unique with Retrieved Object violating key constraint should not be saved.");
+ Assert.That(saved, Is.False, "Test Table Primary Key With Unique with Retrieved Object violating key constraint should not be saved.");
// Delete Previous Unique and Try Reinsert.
var deleted = Database.DeleteObject(uniqueObj);
- Assert.IsTrue(deleted, "Test Table Primary Key With Unique could not delete unique key object.");
- Assert.IsTrue(uniqueObj.IsDeleted, "Test Table Primary Key With Unique unique key object should have delete flag set.");
+ Assert.That(deleted, Is.True, "Test Table Primary Key With Unique could not delete unique key object.");
+ Assert.That(uniqueObj.IsDeleted, Is.True, "Test Table Primary Key With Unique unique key object should have delete flag set.");
var retrievedSaved = Database.SaveObject(retrieved);
- Assert.IsTrue(retrievedSaved, "Test Table Primary Key With Unique Retrieved Object could not be inserted after deleting previous constraint violating object.");
+ Assert.That(retrievedSaved, Is.True, "Test Table Primary Key With Unique Retrieved Object could not be inserted after deleting previous constraint violating object.");
}
///
@@ -851,30 +851,30 @@ public void TestTableWithReadOnly()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableWithReadOnly.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableWithReadOnly.");
var testObj = new TestTableWithReadOnly { TestField = "Test For Read Only", ReadOnly = "ReadOnly Value" };
var inserted = Database.AddObject(testObj);
- Assert.IsTrue(inserted, "Test Table With Readonly couldn't insert object in database.");
+ Assert.That(inserted, Is.True, "Test Table With Readonly couldn't insert object in database.");
// Edit Readonly
testObj.TestField = "Changed Test For Read Only";
testObj.ReadOnly = "ReadOnly Value !!CHANGED!!";
- Assert.IsTrue(testObj.Dirty, "Test Table With Readonly should set Dirty Flag when changing TestField.");
+ Assert.That(testObj.Dirty, Is.True, "Test Table With Readonly should set Dirty Flag when changing TestField.");
var saved = Database.SaveObject(testObj);
- Assert.IsTrue(saved, "Test Table With Readonly couldn't save object in database.");
- Assert.IsFalse(testObj.Dirty, "Test Table With Readonly should no have Dirty Flag when saved.");
+ Assert.That(saved, Is.True, "Test Table With Readonly couldn't save object in database.");
+ Assert.That(testObj.Dirty, Is.False, "Test Table With Readonly should no have Dirty Flag when saved.");
// Retrieve
var retrieved = Database.FindObjectByKey(testObj.ObjectId);
- Assert.IsNotNull(retrieved, "Test Table With Readonly couldn't retrieve object in database.");
- Assert.AreNotEqual(testObj.ReadOnly, retrieved.ReadOnly, "Test Table With ReadOnly shouldn't have saved ReadOnly Field Change.");
- Assert.AreEqual(testObj.TestField, retrieved.TestField, "Test Table With ReadOnly should have saved Test Field Change.");
- Assert.AreEqual("ReadOnly Value", retrieved.ReadOnly, "Test Table With ReadOnly should have the same ReadOnly Field Value as Created.");
+ Assert.That(retrieved, Is.Not.Null, "Test Table With Readonly couldn't retrieve object in database.");
+ Assert.That(retrieved.ReadOnly, Is.Not.EqualTo(testObj.ReadOnly), "Test Table With ReadOnly shouldn't have saved ReadOnly Field Change.");
+ Assert.That(retrieved.TestField, Is.EqualTo(testObj.TestField), "Test Table With ReadOnly should have saved Test Field Change.");
+ Assert.That(retrieved.ReadOnly, Is.EqualTo("ReadOnly Value"), "Test Table With ReadOnly should have the same ReadOnly Field Value as Created.");
}
///
@@ -892,68 +892,68 @@ public void TestTableWithView()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableBaseView.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableBaseView.");
// Insert some Object in Base View
var objBase = new TestTableBaseView { TestField = "TestField for Base View", ViewValue = "This is a Value to be retrieve in View..." };
var inserted = Database.AddObject(objBase);
- Assert.IsTrue(inserted, "Test Table With View could not insert object in database.");
+ Assert.That(inserted, Is.True, "Test Table With View could not insert object in database.");
// Retrieve From View
var retrieve = Database.SelectAllObjects().FirstOrDefault();
- Assert.IsNotNull(retrieve, "Test Table With View could not retrieve inserted Object from view .");
- Assert.AreEqual(objBase.PrimaryKey, retrieve.PrimaryKey, "Test Table With View should retrieve same value from Base and View Object.");
- Assert.AreEqual(objBase.TestField, retrieve.TestField, "Test Table With View should retrieve same value from Base and View Object.");
- Assert.AreEqual(objBase.ViewValue, retrieve.ViewValue, "Test Table With View should retrieve same value from Base and View Object.");
- Assert.AreEqual("Weird Indeed", retrieve.WeirdValue, "Test Table With View should retrieve View Object with 'Weird Value' set as expected from ViewAs.");
+ Assert.That(retrieve, Is.Not.Null, "Test Table With View could not retrieve inserted Object from view .");
+ Assert.That(retrieve.PrimaryKey, Is.EqualTo(objBase.PrimaryKey), "Test Table With View should retrieve same value from Base and View Object.");
+ Assert.That(retrieve.TestField, Is.EqualTo(objBase.TestField), "Test Table With View should retrieve same value from Base and View Object.");
+ Assert.That(retrieve.ViewValue, Is.EqualTo(objBase.ViewValue), "Test Table With View should retrieve same value from Base and View Object.");
+ Assert.That(retrieve.WeirdValue, Is.EqualTo("Weird Indeed"), "Test Table With View should retrieve View Object with 'Weird Value' set as expected from ViewAs.");
// Try Add View Value
var objView = new TestTableAsView { TestField = "TestField for As View", ViewValue = "This is a Value to saved in Base...", WeirdValue = "Anything..." };
var viewInsert = Database.AddObject(objView);
- Assert.IsTrue(viewInsert, "Test Table With View should be able to Insert View Object as Base Object in Database.");
+ Assert.That(viewInsert, Is.True, "Test Table With View should be able to Insert View Object as Base Object in Database.");
// Retrieve from Base
var baseRetrieve = Database.FindObjectByKey(objView.PrimaryKey);
- Assert.IsNotNull(baseRetrieve, "Test Table With View should be able to retrieve object from View Key.");
- Assert.AreEqual(objView.PrimaryKey, baseRetrieve.PrimaryKey, "Test Table With View should retrieve same value from View and Base Object.");
- Assert.AreEqual(objView.TestField, baseRetrieve.TestField, "Test Table With View should retrieve same value from View and Base Object.");
- Assert.AreEqual(objView.ViewValue, baseRetrieve.ViewValue, "Test Table With View should retrieve same value from View and Base Object.");
+ Assert.That(baseRetrieve, Is.Not.Null, "Test Table With View should be able to retrieve object from View Key.");
+ Assert.That(baseRetrieve.PrimaryKey, Is.EqualTo(objView.PrimaryKey), "Test Table With View should retrieve same value from View and Base Object.");
+ Assert.That(baseRetrieve.TestField, Is.EqualTo(objView.TestField), "Test Table With View should retrieve same value from View and Base Object.");
+ Assert.That(baseRetrieve.ViewValue, Is.EqualTo(objView.ViewValue), "Test Table With View should retrieve same value from View and Base Object.");
// Try Save Modified View Value
var viewRetrieve = Database.FindObjectByKey(objView.PrimaryKey);
- Assert.IsNotNull(viewRetrieve, "Test Table With View should be able to retrieve object from View Key.");
+ Assert.That(viewRetrieve, Is.Not.Null, "Test Table With View should be able to retrieve object from View Key.");
viewRetrieve.TestField = "Changed TestField for As View";
viewRetrieve.ViewValue = "Changed Value to be saved in Base...";
var saved = Database.SaveObject(viewRetrieve);
- Assert.IsTrue(saved, "Test Table With View should be able to Save View Object as Base Object in Database.");
- Assert.IsFalse(viewRetrieve.Dirty, "Test Table With View should not have Dirty Flag on View Object Saved.");
+ Assert.That(saved, Is.True, "Test Table With View should be able to Save View Object as Base Object in Database.");
+ Assert.That(viewRetrieve.Dirty, Is.False, "Test Table With View should not have Dirty Flag on View Object Saved.");
// Retrieve Saved
var saveRetrieve = Database.FindObjectByKey(viewRetrieve.PrimaryKey);
- Assert.IsNotNull(saveRetrieve, "Test Table With View should be able to retrieve object from Base Key.");
- Assert.AreEqual(viewRetrieve.PrimaryKey, saveRetrieve.PrimaryKey, "Test Table With View should retrieve same value from View and Base Object.");
- Assert.AreEqual(viewRetrieve.TestField, saveRetrieve.TestField, "Test Table With View should retrieve same value from View and Base Object.");
- Assert.AreEqual(viewRetrieve.ViewValue, saveRetrieve.ViewValue, "Test Table With View should retrieve same value from View and Base Object.");
+ Assert.That(saveRetrieve, Is.Not.Null, "Test Table With View should be able to retrieve object from Base Key.");
+ Assert.That(saveRetrieve.PrimaryKey, Is.EqualTo(viewRetrieve.PrimaryKey), "Test Table With View should retrieve same value from View and Base Object.");
+ Assert.That(saveRetrieve.TestField, Is.EqualTo(viewRetrieve.TestField), "Test Table With View should retrieve same value from View and Base Object.");
+ Assert.That(saveRetrieve.ViewValue, Is.EqualTo(viewRetrieve.ViewValue), "Test Table With View should retrieve same value from View and Base Object.");
// Try Filter Match (HIDDEN)
var objHidden = new TestTableBaseView { TestField = "TestField for HIDDEN Base View", ViewValue = "HIDDEN" };
var savedHidden = Database.AddObject(objHidden);
- Assert.IsTrue(savedHidden, "Test Table With View could not insert object in database.");
+ Assert.That(savedHidden, Is.True, "Test Table With View could not insert object in database.");
var retrieveHidden = Database.FindObjectByKey(objHidden.PrimaryKey);
- Assert.IsNull(retrieveHidden, "Test Table With View should not be able to retrieve object filtered out of View As Query.");
+ Assert.That(retrieveHidden, Is.Null, "Test Table With View should not be able to retrieve object filtered out of View As Query.");
}
@@ -973,7 +973,7 @@ public void TestTableWithViewAndRelation()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTableBaseView.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTableBaseView.");
var relall = Database.SelectAllObjects();
@@ -981,27 +981,27 @@ public void TestTableWithViewAndRelation()
var relnone = Database.SelectAllObjects();
- Assert.IsEmpty(relnone, "Database shouldn't have any record For TestTableRelationsEntries.");
+ Assert.That(relnone, Is.Empty, "Database shouldn't have any record For TestTableRelationsEntries.");
// Insert some Object in Base View
var objBase = new TestTableBaseView { TestField = "TestField for Base View With Relation", ViewValue = "This is a Value to be retrieve in View Relation..." };
var inserted = Database.AddObject(objBase);
- Assert.IsTrue(inserted, "Test Table With View And Relation could not insert object in database.");
+ Assert.That(inserted, Is.True, "Test Table With View And Relation could not insert object in database.");
var entries = Enumerable.Range(0, 5).Select(i => new TestTableRelationsEntries { TestField = string.Format("View Relation Test Field #{0}", i), ForeignTestField = objBase.ViewValue });
var relInserted = Database.AddObject(entries);
- Assert.IsTrue(relInserted, "Test Table With View And Relation could not insert relations object in database.");
+ Assert.That(relInserted, Is.True, "Test Table With View And Relation could not insert relations object in database.");
// Retrieve
var viewRetrieve = Database.FindObjectByKey(objBase.PrimaryKey);
- Assert.IsNotNull(viewRetrieve, "Test Table With View And Relation could not retrieve object from database.");
- Assert.IsNotEmpty(viewRetrieve.Entries, "Test Table With View And Relation should have Relations Populated.");
- CollectionAssert.AreEquivalent(entries.Select(obj => obj.TestField), viewRetrieve.Entries.Select(obj => obj.TestField), "Test Table With View And Relation should have Relations similar to Created Object");
+ Assert.That(viewRetrieve, Is.Not.Null, "Test Table With View And Relation could not retrieve object from database.");
+ Assert.That(viewRetrieve.Entries, Is.Not.Empty, "Test Table With View And Relation should have Relations Populated.");
+ Assert.That(viewRetrieve.Entries.Select(obj => obj.TestField), Is.EquivalentTo(entries.Select(obj => obj.TestField)), "Test Table With View And Relation should have Relations similar to Created Object");
}
///
@@ -1019,7 +1019,7 @@ public void TestTablePrimaryKeyWithPrecache()
var none = Database.SelectAllObjects();
- Assert.IsEmpty(none, "Database shouldn't have any record For TestTablePrecachedPrimaryKey.");
+ Assert.That(none, Is.Empty, "Database shouldn't have any record For TestTablePrecachedPrimaryKey.");
// Insert some Object
var obj = new TestTablePrecachedPrimaryKey { TestField = "Test For Precached Table with Primary Key", PrecachedValue = "Some Value for Precache Table With Primary Key",
@@ -1027,19 +1027,19 @@ public void TestTablePrimaryKeyWithPrecache()
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "Test Table Precached With Primary Key could not insert object in database.");
+ Assert.That(inserted, Is.True, "Test Table Precached With Primary Key could not insert object in database.");
// Find it !
var retrieve = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(retrieve, "Test Table Precached With Primary Key could not retrieve object from database or precache using primary key.");
- Assert.AreEqual(obj.PrimaryKey, retrieve.PrimaryKey, "Test Table Precached With Primary Key should retrieve Object with similar primary key.");
+ Assert.That(retrieve, Is.Not.Null, "Test Table Precached With Primary Key could not retrieve object from database or precache using primary key.");
+ Assert.That(retrieve.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Test Table Precached With Primary Key should retrieve Object with similar primary key.");
// Find it with case insensitive...
var retrieveCase = Database.FindObjectByKey(obj.PrimaryKey.ToUpper());
- Assert.IsNotNull(retrieveCase, "Test Table Precached With Primary Key should be able to retrieve object with primary key using different case.");
- Assert.AreEqual(obj.PrimaryKey, retrieveCase.PrimaryKey, "Test Table Precached With Primary Key should retrieve Object with similar primary key.");
+ Assert.That(retrieveCase, Is.Not.Null, "Test Table Precached With Primary Key should be able to retrieve object with primary key using different case.");
+ Assert.That(retrieveCase.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Test Table Precached With Primary Key should retrieve Object with similar primary key.");
}
///
@@ -1056,8 +1056,8 @@ public void TestTableRelationsWithPrecached()
Database.DeleteObject(Database.SelectAllObjects());
Database.DeleteObject(Database.SelectAllObjects());
- Assert.IsEmpty(Database.SelectAllObjects(), "Relations Test With Precache should begin with Empty Table.");
- Assert.IsEmpty(Database.SelectAllObjects(), "Relations Test With Precache should begin with Empty Table.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Relations Test With Precache should begin with Empty Table.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Relations Test With Precache should begin with Empty Table.");
// Objects
var objs = Enumerable.Range(0, 10).Select(i => new TestTableRelationsWithPrecache { TestField = string.Format("Test Table Relation with Precache #{0}", i) }).ToArray();
@@ -1067,39 +1067,39 @@ public void TestTableRelationsWithPrecached()
var added = Database.AddObject(objs);
- Assert.IsTrue(added, "Relations Test With Precache could not insert test objects.");
+ Assert.That(added, Is.True, "Relations Test With Precache could not insert test objects.");
// Select
var retrieve = Database.SelectAllObjects();
- CollectionAssert.AreEquivalent(objs.Select(obj => obj.ObjectId), retrieve.Select(obj => obj.ObjectId), "Relations Test With Precache should retrieve object similar to created ones.");
- CollectionAssert.AreEquivalent(objs.Select(obj => obj.TestField), retrieve.Select(obj => obj.TestField), "Relations Test With Precache should retrieve object similar to created ones.");
+ Assert.That(retrieve.Select(obj => obj.ObjectId), Is.EquivalentTo(objs.Select(obj => obj.ObjectId)), "Relations Test With Precache should retrieve object similar to created ones.");
+ Assert.That(retrieve.Select(obj => obj.TestField), Is.EquivalentTo(objs.Select(obj => obj.TestField)), "Relations Test With Precache should retrieve object similar to created ones.");
foreach (var ret in retrieve)
{
- CollectionAssert.AreEquivalent(objs.FirstOrDefault(obj => obj.ObjectId.Equals(ret.ObjectId)).Entries.Select(obj => obj.ObjectId), ret.Entries.Select(obj => obj.ObjectId), "Relations Test With Precache should retrieve object entries similar to created ones.");
- CollectionAssert.AreEquivalent(objs.FirstOrDefault(obj => obj.ObjectId.Equals(ret.ObjectId)).Entries.Select(obj => obj.TestField), ret.Entries.Select(obj => obj.TestField), "Relations Test With Precache should retrieve object entries similar to created ones.");
+ Assert.That(ret.Entries.Select(obj => obj.ObjectId), Is.EquivalentTo(objs.FirstOrDefault(obj => obj.ObjectId.Equals(ret.ObjectId)).Entries.Select(obj => obj.ObjectId)), "Relations Test With Precache should retrieve object entries similar to created ones.");
+ Assert.That(ret.Entries.Select(obj => obj.TestField), Is.EquivalentTo(objs.FirstOrDefault(obj => obj.ObjectId.Equals(ret.ObjectId)).Entries.Select(obj => obj.TestField)), "Relations Test With Precache should retrieve object entries similar to created ones.");
}
Database.DeleteObject(Database.SelectAllObjects());
- Assert.IsEmpty(Database.SelectAllObjects(), "Relations Test With Precache should have Empty Entry Table for cache test.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Relations Test With Precache should have Empty Entry Table for cache test.");
Database.FillObjectRelations(objs);
foreach (var obj in objs)
- Assert.IsNull(obj.Entries, "Relation Test With Precache should have objects with null relations after entry deletion.");
+ Assert.That(obj.Entries, Is.Null, "Relation Test With Precache should have objects with null relations after entry deletion.");
// Try Select with no relation
var norel = new TestTableRelationsWithPrecache { TestField = "Test Table Relation with Precache without relations..." };
Database.AddObject(norel);
var selectInserted = Database.SelectAllObjects().Single(obj => obj.TestField.Equals(norel.TestField));
- Assert.IsNull(selectInserted.Entries, "Relations Test With Precache should return null for Entries stored without relation.");
+ Assert.That(selectInserted.Entries, Is.Null, "Relations Test With Precache should return null for Entries stored without relation.");
// Try Fill with null Local Value
var reAddEntries = Database.AddObject(Enumerable.Range(0, 5).Select(i => new TestTableRelationsEntriesPrecached { ForeignTestField = IDGenerator.GenerateID(), TestField = string.Format("Test Table NOT Related Entry with Precache #{0}", i) }));
- Assert.IsTrue(reAddEntries, "Relations Test With Precache Relation Entries could not be inserted for testing...");
+ Assert.That(reAddEntries, Is.True, "Relations Test With Precache Relation Entries could not be inserted for testing...");
foreach(var obj in objs)
{
@@ -1110,7 +1110,7 @@ public void TestTableRelationsWithPrecached()
Database.FillObjectRelations(objs);
foreach (var obj in objs)
- Assert.IsNull(obj.Entries, "Relation Test With Precache should have objects with null relations with null local.");
+ Assert.That(obj.Entries, Is.Null, "Relation Test With Precache should have objects with null relations with null local.");
}
[Test]
@@ -1123,39 +1123,39 @@ public void TestTableRelationWithPrecacheAndPrimaryRemote()
Database.DeleteObject(Database.SelectAllObjects());
Database.DeleteObject(Database.SelectAllObjects());
- Assert.IsEmpty(Database.SelectAllObjects(), "Relations Test With Precache and Primary should begin with Empty Table.");
- Assert.IsEmpty(Database.SelectAllObjects(), "Relations Test With Precache and Primary should begin with Empty Table.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Relations Test With Precache and Primary should begin with Empty Table.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Relations Test With Precache and Primary should begin with Empty Table.");
// Add one object with no relation
var norel = new TestTableRelationsWithPrecacheAndPrimary { TestField = "Table Relation With Precache and Primary Remote" };
var added = Database.AddObject(norel);
- Assert.IsTrue(added, "Relations Test With Precache and Primary could not add test object.");
+ Assert.That(added, Is.True, "Relations Test With Precache and Primary could not add test object.");
// Try selecting
var retrieve = Database.SelectAllObjects().Single();
- Assert.AreEqual(norel.TestField, retrieve.TestField, "Relations Test With Precache and Primary should retrieve similar object.");
- Assert.IsNull(retrieve.Entry, "Relations Test With Precache and Primary should not have relation set for no relation object.");
+ Assert.That(retrieve.TestField, Is.EqualTo(norel.TestField), "Relations Test With Precache and Primary should retrieve similar object.");
+ Assert.That(retrieve.Entry, Is.Null, "Relations Test With Precache and Primary should not have relation set for no relation object.");
// Add relation
var relobj = new TestTableRelationsEntryPrecached { ForeignTestField = "Some Data", ObjectId = norel.ObjectId };
var reladded = Database.AddObject(relobj);
- Assert.IsTrue(reladded, "Relations Test With Precache and Primary could not add test relation entry.");
+ Assert.That(reladded, Is.True, "Relations Test With Precache and Primary could not add test relation entry.");
// Try selecting
var relretrieve = Database.SelectAllObjects().Single();
- Assert.AreEqual(norel.TestField, relretrieve.TestField, "Relations Test With Precache and Primary should retrieve similar object.");
- Assert.IsNotNull(relretrieve.Entry, "Relations Test With Precache and Primary should have valid relation entry.");
- Assert.AreEqual(relobj.ForeignTestField, relretrieve.Entry.ForeignTestField, "Relations Test With Precache and Primary should retrieve similar relation object.");
+ Assert.That(relretrieve.TestField, Is.EqualTo(norel.TestField), "Relations Test With Precache and Primary should retrieve similar object.");
+ Assert.That(relretrieve.Entry, Is.Not.Null, "Relations Test With Precache and Primary should have valid relation entry.");
+ Assert.That(relretrieve.Entry.ForeignTestField, Is.EqualTo(relobj.ForeignTestField), "Relations Test With Precache and Primary should retrieve similar relation object.");
// Try Null Value Relation
relretrieve.ObjectId = null;
Database.FillObjectRelations(relretrieve);
- Assert.IsNull(relretrieve.Entry, "Relations Test With Precache and Primary should return null value for null local field relation...");
+ Assert.That(relretrieve.Entry, Is.Null, "Relations Test With Precache and Primary should return null value for null local field relation...");
}
[Test]
@@ -1169,7 +1169,7 @@ public void SelectObject_TestFieldContainsSpecialISO88591signs_TestfieldIsUnalte
var actual = Database.FindObjectByKey(dataObject.ObjectId).TestField;
var expected = dataObject.TestField;
- Assert.AreEqual(expected, actual);
+ Assert.That(actual, Is.EqualTo(expected));
}
[Test]
@@ -1183,7 +1183,7 @@ public void SelectObject_TestFieldContainsSpecialCp1252signs_TestfieldIsUnaltere
var actual = Database.FindObjectByKey(dataObject.ObjectId).TestField;
var expected = dataObject.TestField;
- Assert.AreEqual(expected, actual);
+ Assert.That(actual, Is.EqualTo(expected));
}
private void AddOrReplaceObject(T dataObject) where T : DataObject
diff --git a/Tests/IntegrationTests/Database/DatabaseTypeTests.cs b/Tests/IntegrationTests/Database/DatabaseTypeTests.cs
index cd79ff00b7..a6c27932bc 100644
--- a/Tests/IntegrationTests/Database/DatabaseTypeTests.cs
+++ b/Tests/IntegrationTests/Database/DatabaseTypeTests.cs
@@ -59,24 +59,24 @@ public void TestBooleanNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Boolean (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Boolean (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Boolean (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Boolean (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Boolean (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Bool, objRetrieved.Bool, "DatabaseTypeTests: in Boolean (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Boolean (NonNull) Test.");
+ Assert.That(objRetrieved.Bool, Is.EqualTo(obj.Bool), "DatabaseTypeTests: in Boolean (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Bool = true;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Boolean (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Boolean (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Boolean (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Boolean (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Boolean (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Bool, objReRetrieved.Bool, "DatabaseTypeTests: in Boolean (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Boolean (NonNull) Test.");
+ Assert.That(objReRetrieved.Bool, Is.EqualTo(obj.Bool), "DatabaseTypeTests: in Boolean (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -89,24 +89,24 @@ public void TestBooleanNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Boolean (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Boolean (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Boolean (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Boolean (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Boolean (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Bool, objRetrieved.Bool, "DatabaseTypeTests: in Boolean (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Boolean (Null) Test.");
+ Assert.That(objRetrieved.Bool, Is.EqualTo(obj.Bool), "DatabaseTypeTests: in Boolean (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Bool = true;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Boolean (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Boolean (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Boolean (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Boolean (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Boolean (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Bool, objReRetrieved.Bool, "DatabaseTypeTests: in Boolean (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Boolean (Null) Test.");
+ Assert.That(objReRetrieved.Bool, Is.EqualTo(obj.Bool), "DatabaseTypeTests: in Boolean (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -123,35 +123,35 @@ public void TestCharNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Char (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Char (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Char (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Char (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Char (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Char, objRetrieved.Char, "DatabaseTypeTests: in Char (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Char (NonNull) Test.");
+ Assert.That(objRetrieved.Char, Is.EqualTo(obj.Char), "DatabaseTypeTests: in Char (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Char = char.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Char (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Char (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Char (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Char (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Char (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Char, objReRetrieved.Char, "DatabaseTypeTests: in Char (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Char (NonNull) Test.");
+ Assert.That(objReRetrieved.Char, Is.EqualTo(obj.Char), "DatabaseTypeTests: in Char (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Char = default(char);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Char (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Char (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Char (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Char (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Char (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Char, objReReRetrieved.Char, "DatabaseTypeTests: in Char (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Char (NonNull) Test.");
+ Assert.That(objReReRetrieved.Char, Is.EqualTo(obj.Char), "DatabaseTypeTests: in Char (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -164,35 +164,35 @@ public void TestCharNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Char (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Char (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Char (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Char (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Char (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Char, objRetrieved.Char, "DatabaseTypeTests: in Char (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Char (Null) Test.");
+ Assert.That(objRetrieved.Char, Is.EqualTo(obj.Char), "DatabaseTypeTests: in Char (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Char = char.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Char (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Char (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Char (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Char (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Char (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Char, objReRetrieved.Char, "DatabaseTypeTests: in Char (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Char (Null) Test.");
+ Assert.That(objReRetrieved.Char, Is.EqualTo(obj.Char), "DatabaseTypeTests: in Char (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Char = default(char);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Char (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Char (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Char (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Char (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Char (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Char, objReReRetrieved.Char, "DatabaseTypeTests: in Char (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Char (Null) Test.");
+ Assert.That(objReReRetrieved.Char, Is.EqualTo(obj.Char), "DatabaseTypeTests: in Char (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -209,35 +209,35 @@ public void TestByteNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Byte (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Byte (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Byte (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Byte (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Byte (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objRetrieved.Byte, "DatabaseTypeTests: in Byte (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Byte (NonNull) Test.");
+ Assert.That(objRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Byte (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Byte = byte.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Byte (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Byte (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Byte (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Byte (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Byte (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objReRetrieved.Byte, "DatabaseTypeTests: in Byte (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Byte (NonNull) Test.");
+ Assert.That(objReRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Byte (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Byte = default(byte);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Byte (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Byte (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Byte (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Byte (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Byte (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objReReRetrieved.Byte, "DatabaseTypeTests: in Byte (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Byte (NonNull) Test.");
+ Assert.That(objReReRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Byte (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -250,35 +250,35 @@ public void TestByteNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Byte (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Byte (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Byte (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Byte (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Byte (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objRetrieved.Byte, "DatabaseTypeTests: in Byte (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Byte (Null) Test.");
+ Assert.That(objRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Byte (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Byte = byte.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Byte (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Byte (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Byte (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Byte (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Byte (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objReRetrieved.Byte, "DatabaseTypeTests: in Byte (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Byte (Null) Test.");
+ Assert.That(objReRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Byte (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Byte = default(byte);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Byte (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Byte (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Byte (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Byte (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Byte (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objReReRetrieved.Byte, "DatabaseTypeTests: in Byte (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Byte (Null) Test.");
+ Assert.That(objReReRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Byte (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -295,35 +295,35 @@ public void TestSbyteNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Sbyte (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Sbyte (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Sbyte (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Sbyte (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Sbyte (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Sbyte, objRetrieved.Sbyte, "DatabaseTypeTests: in Sbyte (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Sbyte (NonNull) Test.");
+ Assert.That(objRetrieved.Sbyte, Is.EqualTo(obj.Sbyte), "DatabaseTypeTests: in Sbyte (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Sbyte = sbyte.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Sbyte (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Sbyte (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Sbyte (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Sbyte (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Sbyte (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Sbyte, objReRetrieved.Sbyte, "DatabaseTypeTests: in Sbyte (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Sbyte (NonNull) Test.");
+ Assert.That(objReRetrieved.Sbyte, Is.EqualTo(obj.Sbyte), "DatabaseTypeTests: in Sbyte (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Sbyte = default(sbyte);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Sbyte (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Sbyte (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Sbyte (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Sbyte (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Sbyte (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Sbyte, objReReRetrieved.Sbyte, "DatabaseTypeTests: in Sbyte (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Sbyte (NonNull) Test.");
+ Assert.That(objReReRetrieved.Sbyte, Is.EqualTo(obj.Sbyte), "DatabaseTypeTests: in Sbyte (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -336,35 +336,35 @@ public void TestSbyteNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Sbyte (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Sbyte (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Sbyte (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Sbyte (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Sbyte (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Sbyte, objRetrieved.Sbyte, "DatabaseTypeTests: in Sbyte (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Sbyte (Null) Test.");
+ Assert.That(objRetrieved.Sbyte, Is.EqualTo(obj.Sbyte), "DatabaseTypeTests: in Sbyte (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Sbyte = sbyte.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Sbyte (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Sbyte (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Sbyte (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Sbyte (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Sbyte (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Sbyte, objReRetrieved.Sbyte, "DatabaseTypeTests: in Sbyte (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Sbyte (Null) Test.");
+ Assert.That(objReRetrieved.Sbyte, Is.EqualTo(obj.Sbyte), "DatabaseTypeTests: in Sbyte (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Sbyte = default(sbyte);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Sbyte (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Sbyte (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Sbyte (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Sbyte (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Sbyte (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Byte, objReReRetrieved.Byte, "DatabaseTypeTests: in Sbyte (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Sbyte (Null) Test.");
+ Assert.That(objReReRetrieved.Byte, Is.EqualTo(obj.Byte), "DatabaseTypeTests: in Sbyte (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -381,35 +381,35 @@ public void TestUShortNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in UShort (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in UShort (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in UShort (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in UShort (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UShort (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UShort, objRetrieved.UShort, "DatabaseTypeTests: in UShort (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UShort (NonNull) Test.");
+ Assert.That(objRetrieved.UShort, Is.EqualTo(obj.UShort), "DatabaseTypeTests: in UShort (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.UShort = ushort.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in UShort (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in UShort (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in UShort (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in UShort (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UShort (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UShort, objReRetrieved.UShort, "DatabaseTypeTests: in UShort (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UShort (NonNull) Test.");
+ Assert.That(objReRetrieved.UShort, Is.EqualTo(obj.UShort), "DatabaseTypeTests: in UShort (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.UShort = default(ushort);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in UShort (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in UShort (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in UShort (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in UShort (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UShort (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UShort, objReReRetrieved.UShort, "DatabaseTypeTests: in UShort (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UShort (NonNull) Test.");
+ Assert.That(objReReRetrieved.UShort, Is.EqualTo(obj.UShort), "DatabaseTypeTests: in UShort (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -422,35 +422,35 @@ public void TestUShortNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in UShort (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in UShort (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in UShort (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in UShort (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UShort (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UShort, objRetrieved.UShort, "DatabaseTypeTests: in UShort (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UShort (Null) Test.");
+ Assert.That(objRetrieved.UShort, Is.EqualTo(obj.UShort), "DatabaseTypeTests: in UShort (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.UShort = ushort.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in UShort (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in UShort (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in UShort (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in UShort (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UShort (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UShort, objReRetrieved.UShort, "DatabaseTypeTests: in UShort (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UShort (Null) Test.");
+ Assert.That(objReRetrieved.UShort, Is.EqualTo(obj.UShort), "DatabaseTypeTests: in UShort (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.UShort = default(ushort);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in UShort (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in UShort (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in UShort (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in UShort (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UShort (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UShort, objReReRetrieved.UShort, "DatabaseTypeTests: in UShort (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UShort (Null) Test.");
+ Assert.That(objReReRetrieved.UShort, Is.EqualTo(obj.UShort), "DatabaseTypeTests: in UShort (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -467,35 +467,35 @@ public void TestShortNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Short (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Short (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Short (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Short (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Short (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Short, objRetrieved.Short, "DatabaseTypeTests: in Short (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Short (NonNull) Test.");
+ Assert.That(objRetrieved.Short, Is.EqualTo(obj.Short), "DatabaseTypeTests: in Short (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Short = short.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Short (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Short (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Short (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Short (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Short (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Short, objReRetrieved.Short, "DatabaseTypeTests: in Short (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Short (NonNull) Test.");
+ Assert.That(objReRetrieved.Short, Is.EqualTo(obj.Short), "DatabaseTypeTests: in Short (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Short = default(short);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Short (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Short (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Short (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Short (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Short (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Short, objReReRetrieved.Short, "DatabaseTypeTests: in Short (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Short (NonNull) Test.");
+ Assert.That(objReReRetrieved.Short, Is.EqualTo(obj.Short), "DatabaseTypeTests: in Short (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -508,35 +508,35 @@ public void TestShortNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Short (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Short (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Short (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Short (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Short (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Short, objRetrieved.Short, "DatabaseTypeTests: in Short (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Short (Null) Test.");
+ Assert.That(objRetrieved.Short, Is.EqualTo(obj.Short), "DatabaseTypeTests: in Short (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Short = short.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Short (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Short (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Short (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Short (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Short (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Short, objReRetrieved.Short, "DatabaseTypeTests: in Short (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Short (Null) Test.");
+ Assert.That(objReRetrieved.Short, Is.EqualTo(obj.Short), "DatabaseTypeTests: in Short (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Short = default(short);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Short (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Short (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Short (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Short (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Short (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Short, objReReRetrieved.Short, "DatabaseTypeTests: in Short (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Short (Null) Test.");
+ Assert.That(objReReRetrieved.Short, Is.EqualTo(obj.Short), "DatabaseTypeTests: in Short (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -553,35 +553,35 @@ public void TestUIntNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in UInt (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in UInt (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in UInt (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in UInt (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UInt (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UInt, objRetrieved.UInt, "DatabaseTypeTests: in UInt (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UInt (NonNull) Test.");
+ Assert.That(objRetrieved.UInt, Is.EqualTo(obj.UInt), "DatabaseTypeTests: in UInt (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.UInt = uint.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in UInt (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in UInt (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in UInt (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in UInt (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UInt (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UInt, objReRetrieved.UInt, "DatabaseTypeTests: in UInt (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UInt (NonNull) Test.");
+ Assert.That(objReRetrieved.UInt, Is.EqualTo(obj.UInt), "DatabaseTypeTests: in UInt (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.UInt = default(uint);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in UInt (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in UInt (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in UInt (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in UInt (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UInt (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UInt, objReReRetrieved.UInt, "DatabaseTypeTests: in UInt (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UInt (NonNull) Test.");
+ Assert.That(objReReRetrieved.UInt, Is.EqualTo(obj.UInt), "DatabaseTypeTests: in UInt (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -594,35 +594,35 @@ public void TestUIntNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in UInt (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in UInt (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in UInt (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in UInt (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UInt (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UInt, objRetrieved.UInt, "DatabaseTypeTests: in UInt (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UInt (Null) Test.");
+ Assert.That(objRetrieved.UInt, Is.EqualTo(obj.UInt), "DatabaseTypeTests: in UInt (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.UInt = uint.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in UInt (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in UInt (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in UInt (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in UInt (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UInt (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UInt, objReRetrieved.UInt, "DatabaseTypeTests: in UInt (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UInt (Null) Test.");
+ Assert.That(objReRetrieved.UInt, Is.EqualTo(obj.UInt), "DatabaseTypeTests: in UInt (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.UInt = default(uint);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in UInt (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in UInt (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in UInt (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in UInt (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in UInt (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.UInt, objReReRetrieved.UInt, "DatabaseTypeTests: in UInt (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in UInt (Null) Test.");
+ Assert.That(objReReRetrieved.UInt, Is.EqualTo(obj.UInt), "DatabaseTypeTests: in UInt (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -639,35 +639,35 @@ public void TestIntNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Int (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Int (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Int (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Int (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Int (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Int, objRetrieved.Int, "DatabaseTypeTests: in Int (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Int (NonNull) Test.");
+ Assert.That(objRetrieved.Int, Is.EqualTo(obj.Int), "DatabaseTypeTests: in Int (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Int = int.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Int (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Int (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Int (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Int (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Int (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Int, objReRetrieved.Int, "DatabaseTypeTests: in Int (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Int (NonNull) Test.");
+ Assert.That(objReRetrieved.Int, Is.EqualTo(obj.Int), "DatabaseTypeTests: in Int (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Int = default(int);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Int (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Int (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Int (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Int (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Int (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Int, objReReRetrieved.Int, "DatabaseTypeTests: in Int (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Int (NonNull) Test.");
+ Assert.That(objReReRetrieved.Int, Is.EqualTo(obj.Int), "DatabaseTypeTests: in Int (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -680,35 +680,35 @@ public void TestIntNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Int (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Int (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Int (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Int (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Int (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Int, objRetrieved.Int, "DatabaseTypeTests: in Int (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Int (Null) Test.");
+ Assert.That(objRetrieved.Int, Is.EqualTo(obj.Int), "DatabaseTypeTests: in Int (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Int = int.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Int (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Int (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Int (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Int (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Int (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Int, objReRetrieved.Int, "DatabaseTypeTests: in Int (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Int (Null) Test.");
+ Assert.That(objReRetrieved.Int, Is.EqualTo(obj.Int), "DatabaseTypeTests: in Int (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Int = default(int);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Int (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Int (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Int (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Int (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Int (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Int, objReReRetrieved.Int, "DatabaseTypeTests: in Int (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Int (Null) Test.");
+ Assert.That(objReReRetrieved.Int, Is.EqualTo(obj.Int), "DatabaseTypeTests: in Int (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -725,35 +725,35 @@ public void TestULongNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in ULong (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in ULong (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in ULong (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in ULong (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in ULong (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.ULong, objRetrieved.ULong, "DatabaseTypeTests: in ULong (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in ULong (NonNull) Test.");
+ Assert.That(objRetrieved.ULong, Is.EqualTo(obj.ULong), "DatabaseTypeTests: in ULong (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.ULong = ulong.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in ULong (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in ULong (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in ULong (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in ULong (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in ULong (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.ULong, objReRetrieved.ULong, "DatabaseTypeTests: in ULong (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in ULong (NonNull) Test.");
+ Assert.That(objReRetrieved.ULong, Is.EqualTo(obj.ULong), "DatabaseTypeTests: in ULong (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.ULong = default(ulong);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in ULong (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in ULong (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in ULong (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in ULong (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in ULong (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.ULong, objReReRetrieved.ULong, "DatabaseTypeTests: in ULong (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in ULong (NonNull) Test.");
+ Assert.That(objReReRetrieved.ULong, Is.EqualTo(obj.ULong), "DatabaseTypeTests: in ULong (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -766,35 +766,35 @@ public void TestULongNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in ULong (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in ULong (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in ULong (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in ULong (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in ULong (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.ULong, objRetrieved.ULong, "DatabaseTypeTests: in ULong (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in ULong (Null) Test.");
+ Assert.That(objRetrieved.ULong, Is.EqualTo(obj.ULong), "DatabaseTypeTests: in ULong (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.ULong = ulong.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in ULong (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in ULong (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in ULong (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in ULong (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in ULong (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.ULong, objReRetrieved.ULong, "DatabaseTypeTests: in ULong (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in ULong (Null) Test.");
+ Assert.That(objReRetrieved.ULong, Is.EqualTo(obj.ULong), "DatabaseTypeTests: in ULong (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.ULong = default(ulong);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in ULong (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in ULong (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in ULong (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in ULong (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in ULong (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.ULong, objReReRetrieved.ULong, "DatabaseTypeTests: in ULong (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in ULong (Null) Test.");
+ Assert.That(objReReRetrieved.ULong, Is.EqualTo(obj.ULong), "DatabaseTypeTests: in ULong (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -811,35 +811,35 @@ public void TestLongNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Long (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Long (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Long (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Long (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Long (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Long, objRetrieved.Long, "DatabaseTypeTests: in Long (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Long (NonNull) Test.");
+ Assert.That(objRetrieved.Long, Is.EqualTo(obj.Long), "DatabaseTypeTests: in Long (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Long = long.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Long (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Long (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Long (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Long (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Long (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Long, objReRetrieved.Long, "DatabaseTypeTests: in Long (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Long (NonNull) Test.");
+ Assert.That(objReRetrieved.Long, Is.EqualTo(obj.Long), "DatabaseTypeTests: in Long (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Long = default(long);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Long (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Long (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Long (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Long (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Long (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Long, objReReRetrieved.Long, "DatabaseTypeTests: in Long (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Long (NonNull) Test.");
+ Assert.That(objReReRetrieved.Long, Is.EqualTo(obj.Long), "DatabaseTypeTests: in Long (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -852,35 +852,35 @@ public void TestLongNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Long (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Long (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Long (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Long (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Long (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Long, objRetrieved.Long, "DatabaseTypeTests: in Long (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Long (Null) Test.");
+ Assert.That(objRetrieved.Long, Is.EqualTo(obj.Long), "DatabaseTypeTests: in Long (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Long = long.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Long (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Long (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Long (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Long (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Long (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Long, objReRetrieved.Long, "DatabaseTypeTests: in Long (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Long (Null) Test.");
+ Assert.That(objReRetrieved.Long, Is.EqualTo(obj.Long), "DatabaseTypeTests: in Long (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Long = default(long);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Long (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Long (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Long (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Long (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Long (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Long, objReReRetrieved.Long, "DatabaseTypeTests: in Long (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Long (Null) Test.");
+ Assert.That(objReReRetrieved.Long, Is.EqualTo(obj.Long), "DatabaseTypeTests: in Long (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -897,35 +897,35 @@ public void TestFloatNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Float (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Float (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Float (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Float (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Float (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Float, objRetrieved.Float, "DatabaseTypeTests: in Float (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Float (NonNull) Test.");
+ Assert.That(objRetrieved.Float, Is.EqualTo(obj.Float), "DatabaseTypeTests: in Float (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Float = float.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Float (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Float (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Float (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Float (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Float (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Float, objReRetrieved.Float, "DatabaseTypeTests: in Float (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Float (NonNull) Test.");
+ Assert.That(objReRetrieved.Float, Is.EqualTo(obj.Float), "DatabaseTypeTests: in Float (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Float = (float)0.1;
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Float (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Float (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Float (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Float (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Float (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Float, objReReRetrieved.Float, "DatabaseTypeTests: in Float (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Float (NonNull) Test.");
+ Assert.That(objReReRetrieved.Float, Is.EqualTo(obj.Float), "DatabaseTypeTests: in Float (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -938,35 +938,35 @@ public void TestFloatNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Float (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Float (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Float (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Float (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Float (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Float, objRetrieved.Float, "DatabaseTypeTests: in Float (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Float (Null) Test.");
+ Assert.That(objRetrieved.Float, Is.EqualTo(obj.Float), "DatabaseTypeTests: in Float (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Float = float.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Float (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Float (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Float (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Float (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Float (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Float, objReRetrieved.Float, "DatabaseTypeTests: in Float (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Float (Null) Test.");
+ Assert.That(objReRetrieved.Float, Is.EqualTo(obj.Float), "DatabaseTypeTests: in Float (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Float = (float)0.1;
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Float (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Float (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Float (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Float (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Float (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Float, objReReRetrieved.Float, "DatabaseTypeTests: in Float (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Float (Null) Test.");
+ Assert.That(objReReRetrieved.Float, Is.EqualTo(obj.Float), "DatabaseTypeTests: in Float (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -983,35 +983,35 @@ public void TestDoubleNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Double (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Double (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Double (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Double (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Double (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Double, objRetrieved.Double, "DatabaseTypeTests: in Double (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Double (NonNull) Test.");
+ Assert.That(objRetrieved.Double, Is.EqualTo(obj.Double), "DatabaseTypeTests: in Double (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Double = double.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Double (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Double (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Double (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Double (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Double (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Double, objReRetrieved.Double, "DatabaseTypeTests: in Double (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Double (NonNull) Test.");
+ Assert.That(objReRetrieved.Double, Is.EqualTo(obj.Double), "DatabaseTypeTests: in Double (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Double = (double)0.1;
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Double (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Double (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Double (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Double (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Double (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Double, objReReRetrieved.Double, "DatabaseTypeTests: in Double (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Double (NonNull) Test.");
+ Assert.That(objReReRetrieved.Double, Is.EqualTo(obj.Double), "DatabaseTypeTests: in Double (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1024,35 +1024,35 @@ public void TestDoubleNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Double (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Double (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Double (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Double (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Double (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Double, objRetrieved.Double, "DatabaseTypeTests: in Double (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Double (Null) Test.");
+ Assert.That(objRetrieved.Double, Is.EqualTo(obj.Double), "DatabaseTypeTests: in Double (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Double = double.MaxValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Double (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Double (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Double (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Double (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Double (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Double, objReRetrieved.Double, "DatabaseTypeTests: in Double (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Double (Null) Test.");
+ Assert.That(objReRetrieved.Double, Is.EqualTo(obj.Double), "DatabaseTypeTests: in Double (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Double = (double)0.1;
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Double (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Double (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Double (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Double (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Double (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Double, objReReRetrieved.Double, "DatabaseTypeTests: in Double (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Double (Null) Test.");
+ Assert.That(objReReRetrieved.Double, Is.EqualTo(obj.Double), "DatabaseTypeTests: in Double (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1069,35 +1069,35 @@ public void TestDateTimeNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in DateTime (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in DateTime (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in DateTime (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in DateTime (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in DateTime (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.DateTime, objRetrieved.DateTime, "DatabaseTypeTests: in DateTime (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in DateTime (NonNull) Test.");
+ Assert.That(objRetrieved.DateTime, Is.EqualTo(obj.DateTime), "DatabaseTypeTests: in DateTime (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.DateTime = DateTime.MinValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in DateTime (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in DateTime (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in DateTime (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in DateTime (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in DateTime (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.DateTime, objReRetrieved.DateTime, "DatabaseTypeTests: in DateTime (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in DateTime (NonNull) Test.");
+ Assert.That(objReRetrieved.DateTime, Is.EqualTo(obj.DateTime), "DatabaseTypeTests: in DateTime (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.DateTime = default(DateTime);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in DateTime (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in DateTime (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in DateTime (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in DateTime (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in DateTime (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.DateTime, objReReRetrieved.DateTime, "DatabaseTypeTests: in DateTime (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in DateTime (NonNull) Test.");
+ Assert.That(objReReRetrieved.DateTime, Is.EqualTo(obj.DateTime), "DatabaseTypeTests: in DateTime (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1110,35 +1110,35 @@ public void TestDateTimeNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in DateTime (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in DateTime (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in DateTime (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in DateTime (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in DateTime (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.DateTime, objRetrieved.DateTime, "DatabaseTypeTests: in DateTime (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in DateTime (Null) Test.");
+ Assert.That(objRetrieved.DateTime, Is.EqualTo(obj.DateTime), "DatabaseTypeTests: in DateTime (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.DateTime = DateTime.MinValue;
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in DateTime (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in DateTime (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in DateTime (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in DateTime (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in DateTime (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.DateTime, objReRetrieved.DateTime, "DatabaseTypeTests: in DateTime (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in DateTime (Null) Test.");
+ Assert.That(objReRetrieved.DateTime, Is.EqualTo(obj.DateTime), "DatabaseTypeTests: in DateTime (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.DateTime = default(DateTime);
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in DateTime (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in DateTime (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in DateTime (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in DateTime (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in DateTime (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.DateTime, objReReRetrieved.DateTime, "DatabaseTypeTests: in DateTime (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in DateTime (Null) Test.");
+ Assert.That(objReReRetrieved.DateTime, Is.EqualTo(obj.DateTime), "DatabaseTypeTests: in DateTime (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1155,35 +1155,35 @@ public void TestStringNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in String (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in String (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in String (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in String (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in String (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.String, objRetrieved.String, "DatabaseTypeTests: in String (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in String (NonNull) Test.");
+ Assert.That(objRetrieved.String, Is.EqualTo(obj.String), "DatabaseTypeTests: in String (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.String = new string(Enumerable.Range(0, 199).Select(i => 'z').Concat(new [] { '@' }).ToArray());
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in String (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in String (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in String (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in String (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in String (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.String, objReRetrieved.String, "DatabaseTypeTests: in String (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in String (NonNull) Test.");
+ Assert.That(objReRetrieved.String, Is.EqualTo(obj.String), "DatabaseTypeTests: in String (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.String = string.Empty;
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in String (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in String (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in String (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in String (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in String (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.String, objReReRetrieved.String, "DatabaseTypeTests: in String (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in String (NonNull) Test.");
+ Assert.That(objReReRetrieved.String, Is.EqualTo(obj.String), "DatabaseTypeTests: in String (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1196,35 +1196,35 @@ public void TestStringNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in String (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in String (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in String (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in String (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in String (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.String, objRetrieved.String, "DatabaseTypeTests: in String (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in String (Null) Test.");
+ Assert.That(objRetrieved.String, Is.EqualTo(obj.String), "DatabaseTypeTests: in String (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.String = new string(Enumerable.Range(0, 199).Select(i => 'z').Concat(new [] { '@' }).ToArray());
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in String (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in String (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in String (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in String (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in String (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.String, objReRetrieved.String, "DatabaseTypeTests: in String (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in String (Null) Test.");
+ Assert.That(objReRetrieved.String, Is.EqualTo(obj.String), "DatabaseTypeTests: in String (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.String = "a";
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in String (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in String (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in String (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in String (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in String (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.String, objReReRetrieved.String, "DatabaseTypeTests: in String (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in String (Null) Test.");
+ Assert.That(objReReRetrieved.String, Is.EqualTo(obj.String), "DatabaseTypeTests: in String (Null) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1241,35 +1241,35 @@ public void TestTextNonNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Text (NonNull) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Text (NonNull) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Text (NonNull) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Text (NonNull) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Text (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Text, objRetrieved.Text, "DatabaseTypeTests: in Text (NonNull) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Text (NonNull) Test.");
+ Assert.That(objRetrieved.Text, Is.EqualTo(obj.Text), "DatabaseTypeTests: in Text (NonNull) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Text = new string(Enumerable.Range(0, 65534).Select(i => 'z').Concat(new [] { '@' }).ToArray());
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Text (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Text (NonNull) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Text (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Text (NonNull) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Text (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Text, objReRetrieved.Text, "DatabaseTypeTests: in Text (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Text (NonNull) Test.");
+ Assert.That(objReRetrieved.Text, Is.EqualTo(obj.Text), "DatabaseTypeTests: in Text (NonNull) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Text = string.Empty;
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Text (NonNull) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Text (NonNull) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Text (NonNull) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Text (NonNull) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Text (NonNull) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Text, objReReRetrieved.Text, "DatabaseTypeTests: in Text (NonNull) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Text (NonNull) Test.");
+ Assert.That(objReReRetrieved.Text, Is.EqualTo(obj.Text), "DatabaseTypeTests: in Text (NonNull) Saved Value and Retrieved Value should be Equal.");
}
[Test]
@@ -1282,35 +1282,35 @@ public void TestTextNull()
// Test Add
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "DatabaseTypeTests: Could not insert object in Text (Null) Test.");
- Assert.IsTrue(obj.IsPersisted, "DatabaseTypeTests: Inserted Object in Text (Null) Test doesn't have Persisted Flag set.");
+ Assert.That(inserted, Is.True, "DatabaseTypeTests: Could not insert object in Text (Null) Test.");
+ Assert.That(obj.IsPersisted, Is.True, "DatabaseTypeTests: Inserted Object in Text (Null) Test doesn't have Persisted Flag set.");
// Test Read
var objRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Text (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Text, objRetrieved.Text, "DatabaseTypeTests: in Text (Null) Insterted Value and Retrieved Value should be Equal.");
+ Assert.That(objRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Text (Null) Test.");
+ Assert.That(objRetrieved.Text, Is.EqualTo(obj.Text), "DatabaseTypeTests: in Text (Null) Insterted Value and Retrieved Value should be Equal.");
// Test Save
obj.Text = new string(Enumerable.Range(0, 65534).Select(i => 'z').Concat(new [] { '@' }).ToArray());
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "DatabaseTypeTests: Could not save objet in Text (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Saved Object in Text (Null) Test still have Dirty Flag set.");
+ Assert.That(saved, Is.True, "DatabaseTypeTests: Could not save objet in Text (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Saved Object in Text (Null) Test still have Dirty Flag set.");
// Test Re-Read
var objReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Text (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Text, objReRetrieved.Text, "DatabaseTypeTests: in Text (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Text (Null) Test.");
+ Assert.That(objReRetrieved.Text, Is.EqualTo(obj.Text), "DatabaseTypeTests: in Text (Null) Saved Value and Retrieved Value should be Equal.");
// Test Re-Save
obj.Text = "a";
var reSaved = Database.SaveObject(obj);
- Assert.IsTrue(reSaved, "DatabaseTypeTests: Could not Re-Save objet in Text (Null) Test.");
- Assert.IsFalse(obj.Dirty, "DatabaseTypeTests: Re-Saved Object in Text (Null) Test still have Dirty Flag set.");
+ Assert.That(reSaved, Is.True, "DatabaseTypeTests: Could not Re-Save objet in Text (Null) Test.");
+ Assert.That(obj.Dirty, Is.False, "DatabaseTypeTests: Re-Saved Object in Text (Null) Test still have Dirty Flag set.");
// Test Re-Re-Read
var objReReRetrieved = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(objReReRetrieved, "DatabaseTypeTests: Could not retrieve object (ID {0}) in Text (Null) Test.", obj.PrimaryKey);
- Assert.AreEqual(obj.Text, objReReRetrieved.Text, "DatabaseTypeTests: in Text (Null) Saved Value and Retrieved Value should be Equal.");
+ Assert.That(objReReRetrieved, Is.Not.Null, $"DatabaseTypeTests: Could not retrieve object (ID {obj.PrimaryKey}) in Text (Null) Test.");
+ Assert.That(objReReRetrieved.Text, Is.EqualTo(obj.Text), "DatabaseTypeTests: in Text (Null) Saved Value and Retrieved Value should be Equal.");
}
}
diff --git a/Tests/IntegrationTests/Database/InterfaceTests.cs b/Tests/IntegrationTests/Database/InterfaceTests.cs
index 27a7d3a778..8bf67898c1 100644
--- a/Tests/IntegrationTests/Database/InterfaceTests.cs
+++ b/Tests/IntegrationTests/Database/InterfaceTests.cs
@@ -49,21 +49,21 @@ public void TestSingleAdd()
var objId = obj.ObjectId;
- Assert.IsFalse(obj.IsPersisted, "Test Object should not have Persisted Flag before adding...");
- Assert.IsTrue(obj.Dirty, "Test Object should be Dirty before adding...");
+ Assert.That(obj.IsPersisted, Is.False, "Test Object should not have Persisted Flag before adding...");
+ Assert.That(obj.Dirty, Is.True, "Test Object should be Dirty before adding...");
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "Test Object should be inserted successfully, something went wrong...");
- Assert.IsTrue(obj.IsPersisted, "Test Object should have Persisted Flag after adding to database...");
- Assert.IsFalse(obj.Dirty, "Test Object should not be Dirty after adding to database...");
- Assert.AreEqual(objId, obj.ObjectId, "Test Object should have kept its ObjectId from Creation...");
+ Assert.That(inserted, Is.True, "Test Object should be inserted successfully, something went wrong...");
+ Assert.That(obj.IsPersisted, Is.True, "Test Object should have Persisted Flag after adding to database...");
+ Assert.That(obj.Dirty, Is.False, "Test Object should not be Dirty after adding to database...");
+ Assert.That(obj.ObjectId, Is.EqualTo(objId), "Test Object should have kept its ObjectId from Creation...");
var retrieved = Database.FindObjectByKey(obj.ObjectId);
- Assert.IsNotNull(retrieved, "Test Object previously added should be retrieved from database...");
- Assert.AreEqual(objId, retrieved.ObjectId, "Test Object previously added and retrieved object should have same ObjectId...");
- Assert.AreEqual(obj.TestField, retrieved.TestField, "Test Object previously added and retrieved object should have equals fields...");
+ Assert.That(retrieved, Is.Not.Null, "Test Object previously added should be retrieved from database...");
+ Assert.That(retrieved.ObjectId, Is.EqualTo(objId), "Test Object previously added and retrieved object should have same ObjectId...");
+ Assert.That(retrieved.TestField, Is.EqualTo(obj.TestField), "Test Object previously added and retrieved object should have equals fields...");
}
///
@@ -79,24 +79,24 @@ public void TestMultipleAddSameTable()
foreach (var obj in objs)
{
- Assert.IsFalse(obj.IsPersisted, "Test Objects should not have Persisted Flag before adding...");
- Assert.IsTrue(obj.Dirty, "Test Objects should be Dirty before adding...");
+ Assert.That(obj.IsPersisted, Is.False, "Test Objects should not have Persisted Flag before adding...");
+ Assert.That(obj.Dirty, Is.True, "Test Objects should be Dirty before adding...");
}
var inserted = Database.AddObject(objs);
- Assert.IsTrue(inserted, "Test Objects should be inserted successfully, something went wrong...");
+ Assert.That(inserted, Is.True, "Test Objects should be inserted successfully, something went wrong...");
foreach (var obj in objs)
{
- Assert.IsTrue(obj.IsPersisted, "Test Objects should have Persisted Flag after adding to database...");
- Assert.IsFalse(obj.Dirty, "Test Objects should not be Dirty after adding to database...");
+ Assert.That(obj.IsPersisted, Is.True, "Test Objects should have Persisted Flag after adding to database...");
+ Assert.That(obj.Dirty, Is.False, "Test Objects should not be Dirty after adding to database...");
}
- CollectionAssert.AreEqual(objsId, objs.Select(obj => obj.ObjectId), "Test Objects should have kept their ObjectId from Creation...");
+ Assert.That(objs.Select(obj => obj.ObjectId), Is.EqualTo(objsId), "Test Objects should have kept their ObjectId from Creation...");
var retrieved = Database.FindObjectsByKey(objsId);
- Assert.IsNotNull(retrieved, "Test Objects retrieved Collection should not be null...");
- CollectionAssert.AreEqual(objsId, retrieved.Select(obj => obj.ObjectId), "Test Objects previously added and retrieved objects should have same ObjectId...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.TestField), retrieved.Select(obj => obj.TestField), "Test Objects previously added and retrieved objects should have equals fields...");
+ Assert.That(retrieved, Is.Not.Null, "Test Objects retrieved Collection should not be null...");
+ Assert.That(retrieved.Select(obj => obj.ObjectId), Is.EqualTo(objsId), "Test Objects previously added and retrieved objects should have same ObjectId...");
+ Assert.That(retrieved.Select(obj => obj.TestField), Is.EqualTo(objs.Select(obj => obj.TestField)), "Test Objects previously added and retrieved objects should have equals fields...");
}
///
@@ -129,53 +129,53 @@ public void TestMultipleAddDifferentTable()
foreach (var obj in objs)
{
- Assert.IsFalse(obj.IsPersisted, "Different Test Objects should not have Persisted Flag before adding...");
- Assert.IsTrue(obj.Dirty, "Different Test Objects should be Dirty before adding...");
+ Assert.That(obj.IsPersisted, Is.False, "Different Test Objects should not have Persisted Flag before adding...");
+ Assert.That(obj.Dirty, Is.True, "Different Test Objects should be Dirty before adding...");
}
var inserted = Database.AddObject(objs);
- Assert.IsTrue(inserted, "Different Test Objects should be inserted successfully, something went wrong...");
+ Assert.That(inserted, Is.True, "Different Test Objects should be inserted successfully, something went wrong...");
foreach (var obj in objs)
{
- Assert.IsTrue(obj.IsPersisted, "Test Objects should have Persisted Flag after adding to database...");
- Assert.IsFalse(obj.Dirty, "Test Objects should not be Dirty after adding to database...");
+ Assert.That(obj.IsPersisted, Is.True, "Test Objects should have Persisted Flag after adding to database...");
+ Assert.That(obj.Dirty, Is.False, "Test Objects should not be Dirty after adding to database...");
}
foreach (var obj in objsTestTableRelations)
{
foreach (var ent in obj.Entries)
{
- Assert.IsTrue(ent.IsPersisted, "TestTableRelationEntries Objects should have Persisted Flag after adding to database...");
- Assert.IsFalse(ent.Dirty, "TestTableRelationEntries Objects should not be Dirty after adding to database...");
+ Assert.That(ent.IsPersisted, Is.True, "TestTableRelationEntries Objects should have Persisted Flag after adding to database...");
+ Assert.That(ent.Dirty, Is.False, "TestTableRelationEntries Objects should not be Dirty after adding to database...");
}
}
- CollectionAssert.AreEquivalent(objsTestTableId, objs.Where(obj => obj.GetType() == typeof(TestTable)).Select(obj => obj.ObjectId), "TestTable Objects should have kept their ObjectId from Creation...");
- CollectionAssert.AreEquivalent(objsTestTableRelationsId, objs.Where(obj => obj.GetType() == typeof(TestTableRelations)).Select(obj => obj.ObjectId), "TestTableRelations Objects should have kept their ObjectId from Creation...");
- CollectionAssert.AreNotEquivalent(objsTestTableAutoIncId, objs.Where(obj => obj.GetType() == typeof(TestTableAutoInc)).Select(obj => obj.ObjectId), "TestTableAutoInc Objects should NOT have kept their ObjectId from Creation...");
+ Assert.That(objs.Where(obj => obj.GetType() == typeof(TestTable)).Select(obj => obj.ObjectId), Is.EquivalentTo(objsTestTableId), "TestTable Objects should have kept their ObjectId from Creation...");
+ Assert.That(objs.Where(obj => obj.GetType() == typeof(TestTableRelations)).Select(obj => obj.ObjectId), Is.EquivalentTo(objsTestTableRelationsId), "TestTableRelations Objects should have kept their ObjectId from Creation...");
+ Assert.That(objs.Where(obj => obj.GetType() == typeof(TestTableAutoInc)).Select(obj => obj.ObjectId), Is.Not.EquivalentTo(objsTestTableAutoIncId), "TestTableAutoInc Objects should NOT have kept their ObjectId from Creation...");
foreach (var obj in objs.Where(obj => obj.GetType() == typeof(TestTableRelations)).Cast())
- CollectionAssert.AreEquivalent(objsTestTableRelationsEntriesId[obj.ObjectId], obj.Entries.Select(ent => ent.ObjectId),
+ Assert.That(obj.Entries.Select(ent => ent.ObjectId), Is.EquivalentTo(objsTestTableRelationsEntriesId[obj.ObjectId]),
"TestTableRelationsEntries Objects should have kept their ObjectId from Creation...");
var retrievedTestTable = Database.FindObjectsByKey(objsTestTableId);
- Assert.IsNotNull(retrievedTestTable, "TestTable Objects retrieved Collection should not be null...");
- CollectionAssert.AreEqual(objsTestTableId, retrievedTestTable.Select(obj => obj.ObjectId), "TestTable Objects previously added and retrieved objects should have same ObjectId...");
- CollectionAssert.AreEqual(objsTestTable.Select(obj => obj.TestField), retrievedTestTable.Select(obj => obj.TestField), "TestTable Objects previously added and retrieved objects should have equals fields...");
+ Assert.That(retrievedTestTable, Is.Not.Null, "TestTable Objects retrieved Collection should not be null...");
+ Assert.That(retrievedTestTable.Select(obj => obj.ObjectId), Is.EqualTo(objsTestTableId), "TestTable Objects previously added and retrieved objects should have same ObjectId...");
+ Assert.That(retrievedTestTable.Select(obj => obj.TestField), Is.EqualTo(objsTestTable.Select(obj => obj.TestField)), "TestTable Objects previously added and retrieved objects should have equals fields...");
var retrievedTestTableAutoInc = Database.FindObjectsByKey(objsTestTableAutoInc.Select(key => (object)key.PrimaryKey));
- Assert.IsNotNull(retrievedTestTableAutoInc, "TestTableAutoInc Objects retrieved Collection should not be null...");
- CollectionAssert.AreEqual(objsTestTableAutoInc.Select(key => key.PrimaryKey.ToString()), retrievedTestTableAutoInc.Select(obj => obj.ObjectId), "TestTableAutoInc Objects previously added and retrieved objects should have same ObjectId...");
- CollectionAssert.AreEqual(objsTestTableAutoInc.Select(obj => obj.TestField), retrievedTestTableAutoInc.Select(obj => obj.TestField), "TestTableAutoInc Objects previously added and retrieved objects should have equals fields...");
+ Assert.That(retrievedTestTableAutoInc, Is.Not.Null, "TestTableAutoInc Objects retrieved Collection should not be null...");
+ Assert.That(retrievedTestTableAutoInc.Select(obj => obj.ObjectId), Is.EqualTo(objsTestTableAutoInc.Select(key => key.PrimaryKey.ToString())), "TestTableAutoInc Objects previously added and retrieved objects should have same ObjectId...");
+ Assert.That(retrievedTestTableAutoInc.Select(obj => obj.TestField), Is.EqualTo(objsTestTableAutoInc.Select(obj => obj.TestField)), "TestTableAutoInc Objects previously added and retrieved objects should have equals fields...");
var retrievedTestTableRelations = Database.FindObjectsByKey(objsTestTableRelationsId);
- Assert.IsNotNull(retrievedTestTableRelations, "TestTableRelations Objects retrieved Collection should not be null...");
- CollectionAssert.AreEqual(objsTestTableRelationsId, retrievedTestTableRelations.Select(obj => obj.ObjectId), "TestTableRelations Objects previously added and retrieved objects should have same ObjectId...");
- CollectionAssert.AreEqual(objsTestTableRelations.Select(obj => obj.TestField), retrievedTestTableRelations.Select(obj => obj.TestField), "TestTableRelations Objects previously added and retrieved objects should have equals fields...");
+ Assert.That(retrievedTestTableRelations, Is.Not.Null, "TestTableRelations Objects retrieved Collection should not be null...");
+ Assert.That(retrievedTestTableRelations.Select(obj => obj.ObjectId), Is.EqualTo(objsTestTableRelationsId), "TestTableRelations Objects previously added and retrieved objects should have same ObjectId...");
+ Assert.That(retrievedTestTableRelations.Select(obj => obj.TestField), Is.EqualTo(objsTestTableRelations.Select(obj => obj.TestField)), "TestTableRelations Objects previously added and retrieved objects should have equals fields...");
foreach (var obj in retrievedTestTableRelations)
- CollectionAssert.AreEquivalent(objsTestTableRelationsEntriesId[obj.ObjectId], obj.Entries.Select(ent => ent.ObjectId),
+ Assert.That(obj.Entries.Select(ent => ent.ObjectId), Is.EquivalentTo(objsTestTableRelationsEntriesId[obj.ObjectId]),
"TestTableRelationsEntries Objects previously added and retrieved objects should have same ObjectId...");
}
@@ -197,8 +197,8 @@ public void TestSingleAddNonRegistered()
{
var dbo = new TableNotRegistered();
var added = Database.AddObject(dbo);
- Assert.IsFalse(added, "Adding a Single non registered Object should not return success...");
- Assert.IsFalse(dbo.IsPersisted, "Adding a Single non registered Object should not have Persisted Flag...");
+ Assert.That(added, Is.False, "Adding a Single non registered Object should not return success...");
+ Assert.That(dbo.IsPersisted, Is.False, "Adding a Single non registered Object should not have Persisted Flag...");
}
///
@@ -221,9 +221,9 @@ public void TestMultipleAddNonRegistered()
Database.RegisterDataObject(typeof(TestTable));
var dbo = new DataObject[] { new TestTable { TestField = "Test Multiple Add with some non registered Values" }, new TableNotRegistered() };
var added = Database.AddObject(dbo);
- Assert.IsFalse(added, "Adding Multiple non registered Object should not return success...");
- Assert.IsFalse(dbo[1].IsPersisted, "Adding a Multiple non registered Object should not have Persisted Flag on unregistered Object...");
- Assert.IsTrue(dbo[0].IsPersisted, "Adding a Multiple non registered Object should have Persisted Flag on registered Object...");
+ Assert.That(added, Is.False, "Adding Multiple non registered Object should not return success...");
+ Assert.That(dbo[1].IsPersisted, Is.False, "Adding a Multiple non registered Object should not have Persisted Flag on unregistered Object...");
+ Assert.That(dbo[0].IsPersisted, Is.True, "Adding a Multiple non registered Object should have Persisted Flag on registered Object...");
}
[Test, Explicit]
@@ -237,9 +237,9 @@ public void BenchSingleAdd()
Database.DeleteObject(Database.SelectAllObjects());
Database.DeleteObject(Database.SelectAllObjects());
- Assert.IsEmpty(Database.SelectAllObjects(), "Database shouldn't have any record For TestTable.");
- Assert.IsEmpty(Database.SelectAllObjects(), "Database shouldn't have any record For TestTable.");
- Assert.IsEmpty(Database.SelectAllObjects(), "Database shouldn't have any record For TestTable.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Database shouldn't have any record For TestTable.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Database shouldn't have any record For TestTable.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Database shouldn't have any record For TestTable.");
var objs = Enumerable.Range(0, 100).Select(i => new TestTable { TestField = string.Format("Bench Single Add '{0}'", i) }).ToArray();
@@ -280,9 +280,9 @@ public void BenchMultipleAdd()
Database.DeleteObject(Database.SelectAllObjects());
Database.DeleteObject(Database.SelectAllObjects());
- Assert.IsEmpty(Database.SelectAllObjects(), "Database shouldn't have any record For TestTable.");
- Assert.IsEmpty(Database.SelectAllObjects(), "Database shouldn't have any record For TestTable.");
- Assert.IsEmpty(Database.SelectAllObjects(), "Database shouldn't have any record For TestTable.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Database shouldn't have any record For TestTable.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Database shouldn't have any record For TestTable.");
+ Assert.That(Database.SelectAllObjects(), Is.Empty, "Database shouldn't have any record For TestTable.");
var objs = Enumerable.Range(0, 100).Select(i => new TestTable { TestField = string.Format("Bench Multiple Add '{0}'", i) }).ToArray();
@@ -317,17 +317,17 @@ public void TestSingleSave()
var inserted = Database.AddObject(obj);
obj.TestField = "Test Single Save New Value";
- Assert.IsTrue(obj.Dirty, "Changing TestTable Object should set Dirty Flag...");
+ Assert.That(obj.Dirty, Is.True, "Changing TestTable Object should set Dirty Flag...");
var saved = Database.SaveObject(obj);
- Assert.IsTrue(saved, "Changed Object Should be Saved Successfully in database...");
- Assert.IsFalse(obj.Dirty, "Changed Object should not have Dirty flag after Saving...");
+ Assert.That(saved, Is.True, "Changed Object Should be Saved Successfully in database...");
+ Assert.That(obj.Dirty, Is.False, "Changed Object should not have Dirty flag after Saving...");
var retrieve = Database.FindObjectByKey(obj.ObjectId);
- Assert.IsNotNull(retrieve, "Changed Object Should be retrieved from database...");
- Assert.AreEqual(obj.TestField, retrieve.TestField, "Previously Changed Object and newly retrieved Object should have the same field value...");
+ Assert.That(retrieve, Is.Not.Null, "Changed Object Should be retrieved from database...");
+ Assert.That(retrieve.TestField, Is.EqualTo(obj.TestField), "Previously Changed Object and newly retrieved Object should have the same field value...");
}
///
@@ -345,19 +345,19 @@ public void TestMultipleSaveSameTable()
{
obj.TestField = string.Format("Test Multi Save Same Table Changed #{0}", current);
current++;
- Assert.IsTrue(obj.Dirty, "Changing TestTable Objects should set Dirty Flag...");
+ Assert.That(obj.Dirty, Is.True, "Changing TestTable Objects should set Dirty Flag...");
}
var saved = Database.SaveObject(objs);
- Assert.IsTrue(saved, "Changed Objects Should be Saved Successfully in database...");
+ Assert.That(saved, Is.True, "Changed Objects Should be Saved Successfully in database...");
foreach (var obj in objs)
- Assert.IsFalse(obj.Dirty, "Changed Objects should not have Dirty flag after Saving...");
+ Assert.That(obj.Dirty, Is.False, "Changed Objects should not have Dirty flag after Saving...");
var retrieved = Database.FindObjectsByKey(objs.Select(obj => obj.ObjectId));
- Assert.IsNotNull(retrieved, "Changed Objects Collection Should be retrieved from database...");
- CollectionAssert.AreEquivalent(objs.Select(obj => obj.TestField), retrieved.Select(obj => obj.TestField), "Previously Changed Objects and newly retrieved Objects should have the same field value...");
+ Assert.That(retrieved, Is.Not.Null, "Changed Objects Collection Should be retrieved from database...");
+ Assert.That(retrieved.Select(obj => obj.TestField), Is.EquivalentTo(objs.Select(obj => obj.TestField)), "Previously Changed Objects and newly retrieved Objects should have the same field value...");
}
///
@@ -389,7 +389,7 @@ public void TestMultipleSaveDifferentTable()
{
obj.TestField = string.Format("Test Multi Save Same Table Changed #{0}", current);
current++;
- Assert.IsTrue(obj.Dirty, "Changing TestTable Objects should set Dirty Flag...");
+ Assert.That(obj.Dirty, Is.True, "Changing TestTable Objects should set Dirty Flag...");
}
foreach (var obj in objsTestTableRelations)
@@ -400,27 +400,27 @@ public void TestMultipleSaveDifferentTable()
var saved = Database.SaveObject(objs);
- Assert.IsTrue(saved, "Changed Objects Should be Saved Successfully in database...");
+ Assert.That(saved, Is.True, "Changed Objects Should be Saved Successfully in database...");
foreach (var obj in objs)
- Assert.IsFalse(obj.Dirty, "Changed Objects should not have Dirty flag after Saving...");
+ Assert.That(obj.Dirty, Is.False, "Changed Objects should not have Dirty flag after Saving...");
foreach (var obj in objsTestTableRelations)
{
foreach (var ent in obj.Entries)
- Assert.IsFalse(ent.Dirty, "Changed Objects Relations should not have Dirty flag after Saving...");
+ Assert.That(ent.Dirty, Is.False, "Changed Objects Relations should not have Dirty flag after Saving...");
}
var retrieved = Database.FindObjectsByKey(objsTestTable.Select(obj => obj.ObjectId))
.Concat(Database.FindObjectsByKey(objsTestTableAutoInc.Select(obj => obj.ObjectId)))
.Concat(Database.FindObjectsByKey(objsTestTableRelations.Select(obj => obj.ObjectId)));
- Assert.IsNotNull(retrieved, "Changed Objects Collection Should be retrieved from database...");
- CollectionAssert.AreEquivalent(objs.Select(obj => obj.TestField), retrieved.Select(obj => obj.TestField), "Previously Changed Objects and newly retrieved Objects should have the same field value...");
+ Assert.That(retrieved, Is.Not.Null, "Changed Objects Collection Should be retrieved from database...");
+ Assert.That(retrieved.Select(obj => obj.TestField), Is.EquivalentTo(objs.Select(obj => obj.TestField)), "Previously Changed Objects and newly retrieved Objects should have the same field value...");
foreach (var obj in retrieved.Where(o => o.GetType() == typeof(TestTableRelations)).OfType())
{
- CollectionAssert.AreEquivalent(objsTestTableRelations.First(o => o.ObjectId == obj.ObjectId).Entries.Select(o => o.ObjectId),
- obj.Entries.Select(o => o.ObjectId), "Previously Changed Objects and newly retrieved Objects should have the same Relations Collections...");
+ Assert.That(objsTestTableRelations.First(o => o.ObjectId == obj.ObjectId).Entries.Select(o => o.ObjectId),
+ Is.EquivalentTo(obj.Entries.Select(o => o.ObjectId)), "Previously Changed Objects and newly retrieved Objects should have the same Relations Collections...");
}
}
@@ -445,8 +445,8 @@ public void TestSingleSaveNonRegistered()
DataObject obj = new TableNotRegistered();
obj.Dirty = true;
var saved = Database.SaveObject(obj);
- Assert.IsFalse(saved, "Trying to save a non registered object should not return success...");
- Assert.IsTrue(obj.Dirty, "Failing to save a non registered object should not remove Dirty Flag...");
+ Assert.That(saved, Is.False, "Trying to save a non registered object should not return success...");
+ Assert.That(obj.Dirty, Is.True, "Failing to save a non registered object should not remove Dirty Flag...");
}
///
@@ -477,9 +477,9 @@ public void TestMultipleSaveNonRegistered()
var saved = Database.SaveObject(dbo);
- Assert.IsFalse(saved, "Saving Multiple non registered Object should not return success...");
- Assert.IsFalse(dbo[0].Dirty, "Saving a Collection with non registered Object should not have Dirty Flag on registered Object...");
- Assert.IsTrue(dbo[1].Dirty, "Saving a Collection with non registered Object should have Dirty Flag on non-registered Object...");
+ Assert.That(saved, Is.False, "Saving Multiple non registered Object should not return success...");
+ Assert.That(dbo[0].Dirty, Is.False, "Saving a Collection with non registered Object should not have Dirty Flag on registered Object...");
+ Assert.That(dbo[1].Dirty, Is.True, "Saving a Collection with non registered Object should have Dirty Flag on non-registered Object...");
}
#endregion
@@ -494,16 +494,16 @@ public void TestSingleDelete()
var obj = new TestTable { TestField = "Test Single Delete" };
var inserted = Database.AddObject(obj);
- Assert.IsTrue(obj.IsPersisted, "Added Object should have Persisted Flag...");
+ Assert.That(obj.IsPersisted, Is.True, "Added Object should have Persisted Flag...");
var deleted = Database.DeleteObject(obj);
- Assert.IsTrue(deleted, "Added Object should be Successfully Deleted from database...");
- Assert.IsFalse(obj.IsPersisted, "Deleted Object should not have Persisted Flag");
- Assert.IsTrue(obj.IsDeleted, "Deleted Object should have Deleted Flag");
+ Assert.That(deleted, Is.True, "Added Object should be Successfully Deleted from database...");
+ Assert.That(obj.IsPersisted, Is.False, "Deleted Object should not have Persisted Flag");
+ Assert.That(obj.IsDeleted, Is.True, "Deleted Object should have Deleted Flag");
var retrieve = Database.FindObjectByKey(obj.ObjectId);
- Assert.IsNull(retrieve, "Retrieving Deleted Object should return null...");
+ Assert.That(retrieve, Is.Null, "Retrieving Deleted Object should return null...");
}
///
@@ -517,20 +517,20 @@ public void TestMultipleDeleteSameTable()
var inserted = Database.AddObject(objs);
foreach (var obj in objs)
- Assert.IsTrue(obj.IsPersisted, "Added Objects should have Persisted Flag...");
+ Assert.That(obj.IsPersisted, Is.True, "Added Objects should have Persisted Flag...");
var deleted = Database.DeleteObject(objs);
- Assert.IsTrue(deleted, "Added Objects should be Successfully Deleted from database...");
+ Assert.That(deleted, Is.True, "Added Objects should be Successfully Deleted from database...");
foreach (var obj in objs)
{
- Assert.IsFalse(obj.IsPersisted, "Deleted Objects should not have Persisted Flag");
- Assert.IsTrue(obj.IsDeleted, "Deleted Objects should have Deleted Flag");
+ Assert.That(obj.IsPersisted, Is.False, "Deleted Objects should not have Persisted Flag");
+ Assert.That(obj.IsDeleted, Is.True, "Deleted Objects should have Deleted Flag");
}
var retrieve = Database.FindObjectsByKey(objs.Select(obj => obj.ObjectId));
- Assert.IsNotNull(retrieve, "Retrieving Deleted Objects Collection should not return null...");
- Assert.IsEmpty(retrieve.Where(obj => obj != null), "Retrieved Deleted Objects Collection should be empty...");
+ Assert.That(retrieve, Is.Not.Null, "Retrieving Deleted Objects Collection should not return null...");
+ Assert.That(retrieve.Where(obj => obj != null), Is.Empty, "Retrieved Deleted Objects Collection should be empty...");
}
///
@@ -557,25 +557,25 @@ public void TestMultipleDeleteDifferentTable()
var inserted = Database.AddObject(objs);
- Assert.IsTrue(inserted, "Object Should be inserted to test Delete Cases...");
+ Assert.That(inserted, Is.True, "Object Should be inserted to test Delete Cases...");
// Delete Objects
var deleted = Database.DeleteObject(objs);
- Assert.IsTrue(deleted, "Object should be deleted successfully...");
+ Assert.That(deleted, Is.True, "Object should be deleted successfully...");
foreach (var obj in objs)
{
- Assert.IsTrue(obj.IsDeleted, "Deleted Objects should have Deleted Flag...");
- Assert.IsFalse(obj.IsPersisted, "Deleted Objects should not have Persisted Flag...");
+ Assert.That(obj.IsDeleted, Is.True, "Deleted Objects should have Deleted Flag...");
+ Assert.That(obj.IsPersisted, Is.False, "Deleted Objects should not have Persisted Flag...");
}
foreach (var obj in objsTestTableRelations)
{
foreach (var ent in obj.Entries)
{
- Assert.IsTrue(ent.IsDeleted, "Deleted Objects should have Deleted Flag...");
- Assert.IsFalse(ent.IsPersisted, "Deleted Objects should not have Persisted Flag...");
+ Assert.That(ent.IsDeleted, Is.True, "Deleted Objects should have Deleted Flag...");
+ Assert.That(ent.IsPersisted, Is.False, "Deleted Objects should not have Persisted Flag...");
}
}
@@ -583,13 +583,13 @@ public void TestMultipleDeleteDifferentTable()
.Concat(Database.FindObjectsByKey(objsTestTableAutoInc.Select(obj => obj.ObjectId)))
.Concat(Database.FindObjectsByKey(objsTestTableRelations.Select(obj => obj.ObjectId)));
- Assert.IsNotNull(retrieved, "Deleted Objects Collection Should be retrieved Empty not null from database...");
- Assert.IsEmpty(retrieved.Where(obj => obj != null), "Deleted Objects Collection Should be retrieved Empty from database...");
+ Assert.That(retrieved, Is.Not.Null, "Deleted Objects Collection Should be retrieved Empty not null from database...");
+ Assert.That(retrieved.Where(obj => obj != null), Is.Empty, "Deleted Objects Collection Should be retrieved Empty from database...");
var relRetrieved = Database.FindObjectsByKey(objsTestTableRelations.SelectMany(obj => obj.Entries).Select(ent => ent.ObjectId));
- Assert.IsNotNull(relRetrieved, "Deleted Objects Collection Should be retrieved Empty not null from database...");
- Assert.IsEmpty(relRetrieved.Where(obj => obj != null), "Deleted Objects Collection Should be retrieved Empty from database...");
+ Assert.That(relRetrieved, Is.Not.Null, "Deleted Objects Collection Should be retrieved Empty not null from database...");
+ Assert.That(relRetrieved.Where(obj => obj != null), Is.Empty, "Deleted Objects Collection Should be retrieved Empty from database...");
}
///
@@ -612,8 +612,8 @@ public void TestSingleDeleteNonRegistered()
{
DataObject obj = new TableNotRegistered();
var deleted = Database.DeleteObject(obj);
- Assert.IsFalse(deleted, "Trying to Delete a non registered object should not return success...");
- Assert.IsFalse(obj.IsDeleted, "Failing to Delete a non registered object should not set Deleted Flag...");
+ Assert.That(deleted, Is.False, "Trying to Delete a non registered object should not return success...");
+ Assert.That(obj.IsDeleted, Is.False, "Failing to Delete a non registered object should not set Deleted Flag...");
}
///
@@ -641,9 +641,9 @@ public void TestMutipleDeleteNonRegistered()
var deleted = Database.DeleteObject(dbo);
- Assert.IsFalse(deleted, "Deleting Multiple non registered Object should not return success...");
- Assert.IsTrue(dbo[0].IsDeleted, "Deleting a Collection with non registered Object should set Deleted Flag on registered Object...");
- Assert.IsFalse(dbo[1].IsDeleted, "Deleting a Collection with non registered Object should not set Deleted Flag non-registered Object...");
+ Assert.That(deleted, Is.False, "Deleting Multiple non registered Object should not return success...");
+ Assert.That(dbo[0].IsDeleted, Is.True, "Deleting a Collection with non registered Object should set Deleted Flag on registered Object...");
+ Assert.That(dbo[1].IsDeleted, Is.False, "Deleting a Collection with non registered Object should not set Deleted Flag non-registered Object...");
}
#endregion
@@ -661,19 +661,19 @@ public void TestSingleFindObjectByKey()
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "Find Object By Key Test Could not add object in database...");
+ Assert.That(inserted, Is.True, "Find Object By Key Test Could not add object in database...");
var retrieve = Database.FindObjectByKey(obj.ObjectId);
- Assert.IsNotNull(retrieve, "Find Object By Key Could not retrieve previously added Object...");
- Assert.AreEqual(obj.ObjectId, retrieve.ObjectId, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieve.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieve, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object...");
+ Assert.That(retrieve.ObjectId, Is.EqualTo(obj.ObjectId), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieve.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
var retrieveCase = Database.FindObjectByKey(obj.ObjectId.ToUpper());
- Assert.IsNotNull(retrieveCase, "Find Object By Key Could not retrieve previously added Object using Case Mismatch...");
- Assert.AreEqual(obj.ObjectId, retrieveCase.ObjectId, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieveCase.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveCase, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object using Case Mismatch...");
+ Assert.That(retrieveCase.ObjectId, Is.EqualTo(obj.ObjectId), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveCase.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
}
///
@@ -688,21 +688,21 @@ public void TestMultipleFindObjectByKey()
var inserted = Database.AddObject(objs);
- Assert.IsTrue(inserted, "Find Object By Key Test Could not add objects in database...");
+ Assert.That(inserted, Is.True, "Find Object By Key Test Could not add objects in database...");
var retrieve = Database.FindObjectsByKey(objs.Select(obj => obj.ObjectId));
- Assert.IsNotNull(retrieve, "Find Object By Key Could should not return a null collection...");
- Assert.IsNotEmpty(retrieve.Where(obj => obj != null), "Find Object By Key Could not retrieve previously added Objects...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.ObjectId), retrieve.Select(obj => obj.ObjectId), "Find Object By Key Should return similar Objects to created ones...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.TestField), retrieve.Select(obj => obj.TestField), "Find Object By Key Should return similar Objects to created ones...");
+ Assert.That(retrieve, Is.Not.Null, "Find Object By Key Could should not return a null collection...");
+ Assert.That(retrieve.Where(obj => obj != null), Is.Not.Empty, "Find Object By Key Could not retrieve previously added Objects...");
+ Assert.That(retrieve.Select(obj => obj.ObjectId), Is.EqualTo(objs.Select(obj => obj.ObjectId)), "Find Object By Key Should return similar Objects to created ones...");
+ Assert.That(retrieve.Select(obj => obj.TestField), Is.EqualTo(objs.Select(obj => obj.TestField)), "Find Object By Key Should return similar Objects to created ones...");
var retrieveCase = Database.FindObjectsByKey(objs.Select(obj => obj.ObjectId.ToUpper()));
- Assert.IsNotNull(retrieveCase, "Find Object By Key Could should not return a null collection...");
- Assert.IsNotEmpty(retrieveCase.Where(obj => obj != null), "Find Object By Key Could not retrieve previously added Objects using Case Mismatch...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.ObjectId), retrieveCase.Select(obj => obj.ObjectId), "Find Object By Key Should return similar Objects to created ones...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.TestField), retrieveCase.Select(obj => obj.TestField), "Find Object By Key Should return similar Objects to created ones...");
+ Assert.That(retrieveCase, Is.Not.Null, "Find Object By Key Could should not return a null collection...");
+ Assert.That(retrieveCase.Where(obj => obj != null), Is.Not.Empty, "Find Object By Key Could not retrieve previously added Objects using Case Mismatch...");
+ Assert.That(retrieveCase.Select(obj => obj.ObjectId), Is.EqualTo(objs.Select(obj => obj.ObjectId)), "Find Object By Key Should return similar Objects to created ones...");
+ Assert.That(retrieveCase.Select(obj => obj.TestField), Is.EqualTo(objs.Select(obj => obj.TestField)), "Find Object By Key Should return similar Objects to created ones...");
}
///
@@ -717,19 +717,19 @@ public void TestSingleFindObjectByKeyPrimaryKey()
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "Find Object By Key Test Could not add object in database...");
+ Assert.That(inserted, Is.True, "Find Object By Key Test Could not add object in database...");
var retrieve = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(retrieve, "Find Object By Key Could not retrieve previously added Object...");
- Assert.AreEqual(obj.PrimaryKey, retrieve.PrimaryKey, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieve.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieve, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object...");
+ Assert.That(retrieve.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieve.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
var retrieveCase = Database.FindObjectByKey(obj.PrimaryKey.ToUpper());
- Assert.IsNotNull(retrieveCase, "Find Object By Key Could not retrieve previously added Object using Case Mismatch...");
- Assert.AreEqual(obj.PrimaryKey, retrieveCase.PrimaryKey, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieveCase.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveCase, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object using Case Mismatch...");
+ Assert.That(retrieveCase.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveCase.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
}
///
@@ -745,21 +745,21 @@ public void TestMultipleFindObjectByKeyPrimaryKey()
var inserted = Database.AddObject(objs);
- Assert.IsTrue(inserted, "Find Object By Key Test Could not add objects in database...");
+ Assert.That(inserted, Is.True, "Find Object By Key Test Could not add objects in database...");
var retrieve = Database.FindObjectsByKey(objs.Select(obj => obj.PrimaryKey));
- Assert.IsNotNull(retrieve, "Find Object By Key Could should not return a null collection...");
- Assert.IsNotEmpty(retrieve.Where(obj => obj != null), "Find Object By Key Could not retrieve previously added Objects...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.PrimaryKey), retrieve.Select(obj => obj.PrimaryKey), "Find Object By Key Should return similar Objects to created ones...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.TestField), retrieve.Select(obj => obj.TestField), "Find Object By Key Should return similar Objects to created ones...");
+ Assert.That(retrieve, Is.Not.Null, "Find Object By Key Could should not return a null collection...");
+ Assert.That(retrieve.Where(obj => obj != null), Is.Not.Empty, "Find Object By Key Could not retrieve previously added Objects...");
+ Assert.That(retrieve.Select(obj => obj.PrimaryKey), Is.EqualTo(objs.Select(obj => obj.PrimaryKey)), "Find Object By Key Should return similar Objects to created ones...");
+ Assert.That(retrieve.Select(obj => obj.TestField), Is.EqualTo(objs.Select(obj => obj.TestField)), "Find Object By Key Should return similar Objects to created ones...");
var retrieveCase = Database.FindObjectsByKey(objs.Select(obj => obj.PrimaryKey.ToUpper()));
- Assert.IsNotNull(retrieveCase, "Find Object By Key Could should not return a null collection...");
- Assert.IsNotEmpty(retrieveCase.Where(obj => obj != null), "Find Object By Key Could not retrieve previously added Objects using Case Mismatch...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.PrimaryKey), retrieveCase.Select(obj => obj.PrimaryKey), "Find Object By Key Should return similar Object to created ones...");
- CollectionAssert.AreEqual(objs.Select(obj => obj.TestField), retrieveCase.Select(obj => obj.TestField), "Find Object By Key Should return similar Object to created ones...");
+ Assert.That(retrieveCase, Is.Not.Null, "Find Object By Key Could should not return a null collection...");
+ Assert.That(retrieveCase.Where(obj => obj != null), Is.Not.Empty, "Find Object By Key Could not retrieve previously added Objects using Case Mismatch...");
+ Assert.That(retrieveCase.Select(obj => obj.PrimaryKey), Is.EqualTo(objs.Select(obj => obj.PrimaryKey)), "Find Object By Key Should return similar Object to created ones...");
+ Assert.That(retrieveCase.Select(obj => obj.TestField), Is.EqualTo(objs.Select(obj => obj.TestField)), "Find Object By Key Should return similar Object to created ones...");
}
///
@@ -774,25 +774,25 @@ public void TestSingleFindObjectByKeyPrimaryKeyAutoInc()
var inserted = Database.AddObject(obj);
- Assert.IsTrue(inserted, "Find Object By Key Test Could not add object in database...");
+ Assert.That(inserted, Is.True, "Find Object By Key Test Could not add object in database...");
var retrieve = Database.FindObjectByKey(obj.PrimaryKey);
- Assert.IsNotNull(retrieve, "Find Object By Key Could not retrieve previously added Object...");
- Assert.AreEqual(obj.PrimaryKey, retrieve.PrimaryKey, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieve.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieve, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object...");
+ Assert.That(retrieve.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieve.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
var retrieveCast = Database.FindObjectByKey((long)obj.PrimaryKey);
- Assert.IsNotNull(retrieveCast, "Find Object By Key Could not retrieve previously added Object using Numeric Cast...");
- Assert.AreEqual(obj.PrimaryKey, retrieveCast.PrimaryKey, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieveCast.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveCast, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object using Numeric Cast...");
+ Assert.That(retrieveCast.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveCast.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
var retrieveString = Database.FindObjectByKey(obj.PrimaryKey.ToString());
- Assert.IsNotNull(retrieveString, "Find Object By Key Could not retrieve previously added Object using String Cast...");
- Assert.AreEqual(obj.PrimaryKey, retrieveString.PrimaryKey, "Find Object By Key Should return similar Object to created one...");
- Assert.AreEqual(obj.TestField, retrieveString.TestField, "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveString, Is.Not.Null, "Find Object By Key Could not retrieve previously added Object using String Cast...");
+ Assert.That(retrieveString.PrimaryKey, Is.EqualTo(obj.PrimaryKey), "Find Object By Key Should return similar Object to created one...");
+ Assert.That(retrieveString.TestField, Is.EqualTo(obj.TestField), "Find Object By Key Should return similar Object to created one...");
}
///