diff --git a/.editorconfig b/.editorconfig
index 62cd303a..7bfb4b9b 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -195,13 +195,9 @@ csharp_preserve_single_line_statements = true
# Naming rules
-dotnet_naming_rule.private_members_with_underscore.severity = warning
-dotnet_naming_rule.private_members_with_underscore.symbols = private_fields
-dotnet_naming_rule.private_members_with_underscore.style = prefix_underscore
-
-dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
-dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
-dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+dotnet_naming_rule.interface_should_begin_with_i.severity = warning
+dotnet_naming_rule.interface_should_begin_with_i.symbols = interface
+dotnet_naming_rule.interface_should_begin_with_i.style = begin_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
@@ -219,47 +215,36 @@ dotnet_naming_rule.public_fields_should_be_pascal_case.severity = warning
dotnet_naming_rule.public_fields_should_be_pascal_case.symbols = public_fields
dotnet_naming_rule.public_fields_should_be_pascal_case.style = pascal_case
+dotnet_naming_rule.non_public_fields_with_underscore.severity = warning
+dotnet_naming_rule.non_public_fields_with_underscore.symbols = non_public_fields
+dotnet_naming_rule.non_public_fields_with_underscore.style = prefix_underscore
+
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, field
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.classes.applicable_kinds = class, struct, enum
dotnet_naming_symbols.classes.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.classes.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
-dotnet_naming_symbols.non_field_members.required_modifiers =
-dotnet_naming_symbols.public_fields.applicable_kinds = field, property
-dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal, protected_internal
+dotnet_naming_symbols.public_fields.applicable_kinds = field
+dotnet_naming_symbols.public_fields.applicable_accessibilities = public
-dotnet_naming_symbols.private_fields.applicable_kinds = field, property
-dotnet_naming_symbols.private_fields.applicable_accessibilities = protected, private_protected, private
+dotnet_naming_symbols.non_public_fields.applicable_kinds = field
+dotnet_naming_symbols.non_public_fields.applicable_accessibilities = private, protected, private_protected, internal, protected_internal
# Naming styles
-dotnet_naming_style.pascal_case.required_prefix =
-dotnet_naming_style.pascal_case.required_suffix =
-dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
-dotnet_naming_style.begins_with_i.required_prefix = I
-dotnet_naming_style.begins_with_i.required_suffix =
-dotnet_naming_style.begins_with_i.word_separator =
-dotnet_naming_style.begins_with_i.capitalization = pascal_case
+dotnet_naming_style.begin_with_i.required_prefix = I
+dotnet_naming_style.begin_with_i.capitalization = pascal_case
-dotnet_naming_style.prefix_underscore.capitalization = camel_case
dotnet_naming_style.prefix_underscore.required_prefix = _
-
-# Use underscores for private fields
-dotnet_naming_rule.private_fields_with_underscore.symbols = private_fields
-dotnet_naming_rule.private_fields_with_underscore.style = prefix_underscore
-dotnet_naming_rule.private_fields_with_underscore.severity = warning
-
+dotnet_naming_style.prefix_underscore.capitalization = camel_case
diff --git a/.gitignore b/.gitignore
index e836e82b..59dd0669 100644
--- a/.gitignore
+++ b/.gitignore
@@ -446,3 +446,6 @@ fabric.properties
*.iml
modules.xml
+
+# JetBrains IDE files
+**/.idea/
\ No newline at end of file
diff --git a/Aplib.Tests/Aplib.Core.Tests.csproj b/Aplib.Core.Tests/Aplib.Core.Tests.csproj
similarity index 95%
rename from Aplib.Tests/Aplib.Core.Tests.csproj
rename to Aplib.Core.Tests/Aplib.Core.Tests.csproj
index 2182b62a..5f1377d0 100644
--- a/Aplib.Tests/Aplib.Core.Tests.csproj
+++ b/Aplib.Core.Tests/Aplib.Core.Tests.csproj
@@ -35,8 +35,4 @@
-
-
-
-
diff --git a/Aplib.Tests/BdiAgentTests.cs b/Aplib.Core.Tests/BdiAgentTests.cs
similarity index 97%
rename from Aplib.Tests/BdiAgentTests.cs
rename to Aplib.Core.Tests/BdiAgentTests.cs
index 783214b9..3745714a 100644
--- a/Aplib.Tests/BdiAgentTests.cs
+++ b/Aplib.Core.Tests/BdiAgentTests.cs
@@ -1,5 +1,6 @@
-using Aplib.Core.Belief;
-using Aplib.Core.Desire;
+using Aplib.Core.Agents;
+using Aplib.Core.Belief.BeliefSets;
+using Aplib.Core.Desire.DesireSets;
using Aplib.Core.Desire.Goals;
using Aplib.Core.Intent.Actions;
using Aplib.Core.Intent.Tactics;
diff --git a/Aplib.Tests/Belief/BeliefSetTests.cs b/Aplib.Core.Tests/Belief/BeliefSetTests.cs
similarity index 98%
rename from Aplib.Tests/Belief/BeliefSetTests.cs
rename to Aplib.Core.Tests/Belief/BeliefSetTests.cs
index f4c54e10..6a0b2a4f 100644
--- a/Aplib.Tests/Belief/BeliefSetTests.cs
+++ b/Aplib.Core.Tests/Belief/BeliefSetTests.cs
@@ -1,4 +1,5 @@
-using Aplib.Core.Belief;
+using Aplib.Core.Belief.Beliefs;
+using Aplib.Core.Belief.BeliefSets;
namespace Aplib.Core.Tests.Belief;
@@ -98,7 +99,6 @@ private class TestBeliefSetProperties : BeliefSet
/// Belief that sets Updated to true when UpdateBelief is called.
///
public SimpleBelief Belief2 { get; } = new();
-
}
@@ -122,7 +122,6 @@ private class TestBeliefSetPrivate : BeliefSet
///
public SimpleBelief Belief2 => _belief2;
-
}
///
diff --git a/Aplib.Core.Tests/Belief/BeliefTests.cs b/Aplib.Core.Tests/Belief/BeliefTests.cs
new file mode 100644
index 00000000..9c8e7237
--- /dev/null
+++ b/Aplib.Core.Tests/Belief/BeliefTests.cs
@@ -0,0 +1,269 @@
+using Aplib.Core.Belief.Beliefs;
+using FluentAssertions;
+using Moq;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Aplib.Core.Tests.Belief;
+
+///
+/// Describes a set of tests for the class.
+///
+public class BeliefTests
+{
+ // For testing a C# bug, see `Belief_ConstructedWithAValueTypeViaAnInterface_IsRejected`
+ private struct MyEnumerable : IEnumerable
+ {
+ private readonly int _number;
+
+ private const int _max = 3;
+
+ public MyEnumerable(int number) => _number = number;
+
+ public IEnumerator GetEnumerator()
+ {
+ for (int i = 0; i < _max; i++)
+ {
+ yield return _number;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
+ }
+
+ public class TestBelief : Belief