diff --git a/src/.idea/.idea.L5Sharp/.idea/workspace.xml b/src/.idea/.idea.L5Sharp/.idea/workspace.xml
index 55a26325..09b4e511 100644
--- a/src/.idea/.idea.L5Sharp/.idea/workspace.xml
+++ b/src/.idea/.idea.L5Sharp/.idea/workspace.xml
@@ -8,142 +8,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -199,47 +65,9 @@
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -592,7 +420,7 @@
-
+
1677621948966
@@ -937,7 +765,7 @@
1687451515386
-
+
@@ -973,7 +801,6 @@
-
@@ -998,7 +825,8 @@
-
+
+
diff --git a/src/L5Sharp.Core/Components/Module.cs b/src/L5Sharp.Core/Components/Module.cs
index e73e2d94..e2e13baf 100644
--- a/src/L5Sharp.Core/Components/Module.cs
+++ b/src/L5Sharp.Core/Components/Module.cs
@@ -31,6 +31,8 @@ public Module() : base(L5XName.Module)
{
CatalogNumber = string.Empty;
Revision = new Revision();
+ Vendor = Vendor.Rockwell;
+ ProductType = ProductType.Unknown;
ParentModule = string.Empty;
ParentModPortId = default;
Inhibited = false;
diff --git a/src/L5Sharp.Core/Data/Member.cs b/src/L5Sharp.Core/Data/Member.cs
index 201c228f..68f662e2 100644
--- a/src/L5Sharp.Core/Data/Member.cs
+++ b/src/L5Sharp.Core/Data/Member.cs
@@ -51,20 +51,6 @@ public Member(string name, LogixData data) : base(CreateMember(name, data))
{
}
- ///
- /// Creates a new object with the provided name and data type name.
- ///
- /// The name of the member.
- /// The name of the data type for the member.
- ///
- /// This constructor will use the factory method to instantiate a new instance
- /// of the specified type. If represents a complex type that is not statically defined,
- /// it will defualt to creating a instance having the provided name.
- ///
- public Member(string name, string dataType) : base(CreateMember(name, LogixData.Create(dataType)))
- {
- }
-
///
///
/// Internal will make not something that is deserializable since we only look for public
@@ -168,8 +154,6 @@ protected override void SetData(LogixData? data)
//Otherwise this is a normal decorated data element, and we need to handle the set based on the current value.
switch (Value)
{
- case NullData: //todo perhaps make a decision on if this should or should not be here.
- throw new InvalidOperationException("The member data is null and can not be... ");
case AtomicData:
var atomicType = (AtomicData)data;
SetAtomic(atomicType);
diff --git a/src/L5Sharp.Core/Elements/DataTypeMember.cs b/src/L5Sharp.Core/Elements/DataTypeMember.cs
index 5a2b064f..ca16ccb0 100644
--- a/src/L5Sharp.Core/Elements/DataTypeMember.cs
+++ b/src/L5Sharp.Core/Elements/DataTypeMember.cs
@@ -168,7 +168,7 @@ public int? BitNumber
/// not attached or the L5X does not container the data type reference, this will return a default component with the
/// name specified by this member.
///
- public DataType Definition => GetDefinition(); //todo we need to handle atomic types
+ public DataType Definition => GetDefinition();
///
/// Converts the current instance of to a .
diff --git a/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Default_ShouldBeVerified.verified.txt b/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Default_ShouldBeVerified.verified.txt
index 7bea6280..19947c27 100644
--- a/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Default_ShouldBeVerified.verified.txt
+++ b/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Default_ShouldBeVerified.verified.txt
@@ -1,8 +1,4 @@
-
+
-
-
-
-
\ No newline at end of file
diff --git a/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Initialized_ShouldBeVerified.verified.txt b/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Initialized_ShouldBeVerified.verified.txt
index f228825a..a3f38902 100644
--- a/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Initialized_ShouldBeVerified.verified.txt
+++ b/tests/L5Sharp.Tests/Components/ModuleTests.Serialize_Initialized_ShouldBeVerified.verified.txt
@@ -1,11 +1,7 @@
-
+
-
-
-
-
\ No newline at end of file
diff --git a/tests/L5Sharp.Tests/Components/ModuleTests.cs b/tests/L5Sharp.Tests/Components/ModuleTests.cs
index 9e8cb623..d46e4a4d 100644
--- a/tests/L5Sharp.Tests/Components/ModuleTests.cs
+++ b/tests/L5Sharp.Tests/Components/ModuleTests.cs
@@ -22,7 +22,7 @@ public void New_Default_ShouldHaveExpectedValues()
module.Description.Should().BeNull();
module.CatalogNumber.Should().BeEmpty();
module.Revision.Should().Be("1.0");
- module.Vendor.Should().Be(Vendor.Unknown);
+ module.Vendor.Should().Be(Vendor.Rockwell);
module.ProductType.Should().Be(ProductType.Unknown);
module.ProductCode.Should().Be(0);
module.ParentModule.Should().BeEmpty();
diff --git a/tests/L5Sharp.Tests/Components/TaskTests.AddProgram_ValidProgram_ShouldBeVerified.verified.xml b/tests/L5Sharp.Tests/Components/TaskTests.AddProgram_ValidProgram_ShouldBeVerified.verified.xml
index a56d42eb..efa7c9f9 100644
--- a/tests/L5Sharp.Tests/Components/TaskTests.AddProgram_ValidProgram_ShouldBeVerified.verified.xml
+++ b/tests/L5Sharp.Tests/Components/TaskTests.AddProgram_ValidProgram_ShouldBeVerified.verified.xml
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/tests/L5Sharp.Tests/Components/TaskTests.cs b/tests/L5Sharp.Tests/Components/TaskTests.cs
index d8ae7fa4..4b900080 100644
--- a/tests/L5Sharp.Tests/Components/TaskTests.cs
+++ b/tests/L5Sharp.Tests/Components/TaskTests.cs
@@ -159,6 +159,8 @@ public Task AddProgram_ValidProgram_ShouldBeVerified()
var xml = content.Serialize().ToString();
return VerifyXml(xml)
+ .IgnoreMember("ProjectCreationDate")
+ .IgnoreMember("LastModifiedDate")
.IgnoreMember("ExportDate");
}
}
diff --git a/tests/L5Sharp.Tests/Data/ComplexDataTests.cs b/tests/L5Sharp.Tests/Data/ComplexDataTests.cs
index 0eec82a5..ef1cecab 100644
--- a/tests/L5Sharp.Tests/Data/ComplexDataTests.cs
+++ b/tests/L5Sharp.Tests/Data/ComplexDataTests.cs
@@ -169,7 +169,7 @@ public void AddRange_ValidMembers_ShouldHaveExpectedMember()
{
new("Atomic", 123),
new("String", "Test Value"),
- new("Structure", new TIMER { PRE = 2000 }),
+ new("Structure", new TIMER { PRE = 2000 })
};
var type = new ComplexData();
diff --git a/tests/L5Sharp.Tests/L5XBasicTests.cs b/tests/L5Sharp.Tests/L5XBasicTests.cs
index 84133ea8..b43a86ba 100644
--- a/tests/L5Sharp.Tests/L5XBasicTests.cs
+++ b/tests/L5Sharp.Tests/L5XBasicTests.cs
@@ -45,7 +45,6 @@ public void New_WithControllerAndProcessorNames_ShouldNotBeNullAndExpectedValues
content.Controller.Name.Should().Be("ControllerName");
content.Controller.ProcessorType.Should().Be("1756-L83E");
content.Controller.Revision.Should().BeEquivalentTo(new Revision(33, 1));
- content.Modules.Should().HaveCount(1);
}
[Test]