Index: Core/Common/src/Core.Common.Base/Plugin/DataItemInfo.cs =================================================================== diff -u -rd1e069321cba9d3b92f873fdd18e393a20659542 -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 --- Core/Common/src/Core.Common.Base/Plugin/DataItemInfo.cs (.../DataItemInfo.cs) (revision d1e069321cba9d3b92f873fdd18e393a20659542) +++ Core/Common/src/Core.Common.Base/Plugin/DataItemInfo.cs (.../DataItemInfo.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) @@ -8,6 +8,12 @@ /// public class DataItemInfo { + public DataItemInfo() + { + Name = ""; + Category = ""; + } + /// /// Gets or sets the of the data to create. /// @@ -46,6 +52,12 @@ /// The type of data to create. public class DataItemInfo { + public DataItemInfo() + { + Name = ""; + Category = ""; + } + /// /// Gets the of the data to create. /// Index: Core/Common/src/Core.Common.Base/Service/Activity.cs =================================================================== diff -u -rcf4f947febf6a8d92379094230ca4bade46a87d0 -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 --- Core/Common/src/Core.Common.Base/Service/Activity.cs (.../Activity.cs) (revision cf4f947febf6a8d92379094230ca4bade46a87d0) +++ Core/Common/src/Core.Common.Base/Service/Activity.cs (.../Activity.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) @@ -30,6 +30,7 @@ /// protected Activity() { + Name = ""; State = ActivityState.None; LogMessages = new Collection(); } Index: Core/Common/test/Core.Common.Base.Test/Plugin/ApplicationCoreTest.cs =================================================================== diff -u -rad6f88d1d7b21f950588f6109b79fe007aab0c9e -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 --- Core/Common/test/Core.Common.Base.Test/Plugin/ApplicationCoreTest.cs (.../ApplicationCoreTest.cs) (revision ad6f88d1d7b21f950588f6109b79fe007aab0c9e) +++ Core/Common/test/Core.Common.Base.Test/Plugin/ApplicationCoreTest.cs (.../ApplicationCoreTest.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) @@ -63,7 +63,9 @@ applicationCore.AddPlugin(applicationPlugin); // Assert - Assert.AreEqual(1, applicationCore.GetSupportedFileImporters(targetItem).Count()); + var supportedFileImporters = applicationCore.GetSupportedFileImporters(targetItem).ToArray(); + Assert.AreEqual(1, supportedFileImporters.Length); + Assert.AreSame(fileImporter, supportedFileImporters[0]); } [Test] @@ -146,10 +148,10 @@ applicationCore.AddPlugin(applicationPlugin); // Call - var supportedImporters = applicationCore.GetSupportedFileImporters(targetItem).ToList(); + var supportedImporters = applicationCore.GetSupportedFileImporters(targetItem).ToArray(); // Assert - Assert.AreEqual(2, supportedImporters.Count); + Assert.AreEqual(2, supportedImporters.Length); Assert.AreSame(supportedFileImporter1, supportedImporters[0]); Assert.AreSame(supportedFileImporter2, supportedImporters[1]); } @@ -176,11 +178,8 @@ applicationCore.AddPlugin(applicationPlugin); - // Call - var supportedImporters = applicationCore.GetSupportedFileImporters(null).ToList(); - - // Assert - Assert.AreEqual(0, supportedImporters.Count); + // Call / Assert + CollectionAssert.IsEmpty(applicationCore.GetSupportedFileImporters(null)); } [Test] @@ -213,10 +212,10 @@ applicationCore.AddPlugin(applicationPlugin); // Call - var supportedExporters = applicationCore.GetSupportedFileExporters(targetItem).ToList(); + var supportedExporters = applicationCore.GetSupportedFileExporters(targetItem).ToArray(); // Assert - Assert.AreEqual(2, supportedExporters.Count); + Assert.AreEqual(2, supportedExporters.Length); Assert.AreSame(supportedFileExporter1, supportedExporters[0]); Assert.AreSame(supportedFileExporter2, supportedExporters[1]); } @@ -243,11 +242,8 @@ applicationCore.AddPlugin(applicationPlugin); - // Call - var supportedExporters = applicationCore.GetSupportedFileExporters(null).ToList(); - - // Assert - Assert.AreEqual(0, supportedExporters.Count); + // Call / Assert + CollectionAssert.IsEmpty(applicationCore.GetSupportedFileExporters(null)); } [Test] @@ -279,10 +275,10 @@ applicationCore.AddPlugin(applicationPlugin); // Call - var supportedDataItemInfos = applicationCore.GetSupportedDataItemInfos(new object()).ToList(); + var supportedDataItemInfos = applicationCore.GetSupportedDataItemInfos(new object()).ToArray(); // Assert - Assert.AreEqual(1, supportedDataItemInfos.Count); + Assert.AreEqual(1, supportedDataItemInfos.Length); Assert.AreSame(supportedDataItemInfo, supportedDataItemInfos[0]); } @@ -306,11 +302,8 @@ applicationCore.AddPlugin(applicationPlugin); - // Call - var supportedDataItemInfos = applicationCore.GetSupportedDataItemInfos(null).ToList(); - - // Assert - Assert.AreEqual(0, supportedDataItemInfos.Count); + // Call / Assert + CollectionAssert.IsEmpty(applicationCore.GetSupportedDataItemInfos(null)); } [Test] Index: Core/Common/test/Core.Common.Base.Test/Plugin/DataItemInfoTest.cs =================================================================== diff -u -r2d209fab7140dfcd277106ee15a1896234159930 -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 --- Core/Common/test/Core.Common.Base.Test/Plugin/DataItemInfoTest.cs (.../DataItemInfoTest.cs) (revision 2d209fab7140dfcd277106ee15a1896234159930) +++ Core/Common/test/Core.Common.Base.Test/Plugin/DataItemInfoTest.cs (.../DataItemInfoTest.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) @@ -15,8 +15,8 @@ // Assert Assert.IsNull(dataItemInfo.ValueType); - Assert.IsNull(dataItemInfo.Name); - Assert.IsNull(dataItemInfo.Category); + Assert.AreEqual("", dataItemInfo.Name); + Assert.AreEqual("", dataItemInfo.Category); Assert.IsNull(dataItemInfo.Image); Assert.IsNull(dataItemInfo.AdditionalOwnerCheck); Assert.IsNull(dataItemInfo.CreateData); @@ -30,8 +30,8 @@ // Assert Assert.AreEqual(typeof(double), dataItemInfo.ValueType); - Assert.IsNull(dataItemInfo.Name); - Assert.IsNull(dataItemInfo.Category); + Assert.AreEqual("", dataItemInfo.Name); + Assert.AreEqual("", dataItemInfo.Category); Assert.IsNull(dataItemInfo.Image); Assert.IsNull(dataItemInfo.AdditionalOwnerCheck); Assert.IsNull(dataItemInfo.CreateData); Index: Core/Common/test/Core.Common.Base.Test/Service/ActivityTest.cs =================================================================== diff -u -rd6e6eadf4a2521df75b6d371bacbb181a43058a3 -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 --- Core/Common/test/Core.Common.Base.Test/Service/ActivityTest.cs (.../ActivityTest.cs) (revision d6e6eadf4a2521df75b6d371bacbb181a43058a3) +++ Core/Common/test/Core.Common.Base.Test/Service/ActivityTest.cs (.../ActivityTest.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) @@ -15,7 +15,7 @@ var activity = new SimpleActivity(false, false, false); // Assert - Assert.IsNull(activity.Name); + Assert.AreEqual("", activity.Name); Assert.AreEqual(ActivityState.None, activity.State); Assert.IsNull(activity.ProgressText); CollectionAssert.IsEmpty(activity.LogMessages); @@ -40,16 +40,19 @@ public void ProgressText_SetValue_ProgressChangedListenersAreNotified() { // Setup + const string someProgress = "Some progress"; + var counter = 0; var activity = new SimpleActivity(false, false, false); activity.ProgressChanged += (sender, args) => counter++; // Call - activity.SetProgressText("Some progress"); + activity.SetProgressText(someProgress); // Assert Assert.AreEqual(1, counter); + Assert.AreEqual(someProgress, activity.ProgressText); } [Test] Index: Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationActivityTest.cs =================================================================== diff -u -rd6e6eadf4a2521df75b6d371bacbb181a43058a3 -r3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4 --- Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationActivityTest.cs (.../PipingCalculationActivityTest.cs) (revision d6e6eadf4a2521df75b6d371bacbb181a43058a3) +++ Ringtoets/Piping/test/Ringtoets.Piping.Service.Test/PipingCalculationActivityTest.cs (.../PipingCalculationActivityTest.cs) (revision 3fe1e0bdfa0ff0939bbabbc78386ecc7617c96c4) @@ -49,8 +49,8 @@ // Assert TestHelper.AssertLogMessages(call, messages => { - var msgs = messages.ToList(); - Assert.AreEqual(4, msgs.Count); + var msgs = messages.ToArray(); + Assert.AreEqual(4, msgs.Length); StringAssert.StartsWith(String.Format("Validatie van '{0}' gestart om: ", invalidPipingCalculation.Name), msgs[0]); StringAssert.StartsWith("Validatie mislukt: ", msgs[1]); StringAssert.StartsWith("Validatie mislukt: ", msgs[2]); @@ -76,8 +76,8 @@ // Assert TestHelper.AssertLogMessages(call, messages => { - var msgs = messages.ToList(); - Assert.AreEqual(4, msgs.Count); + var msgs = messages.ToArray(); + Assert.AreEqual(4, msgs.Length); StringAssert.StartsWith(String.Format("Validatie van '{0}' gestart om: ", validPipingCalculation.Name), msgs[0]); StringAssert.StartsWith(String.Format("Validatie van '{0}' beƫindigd om: ", validPipingCalculation.Name), msgs[1]); StringAssert.StartsWith(String.Format("Berekening van '{0}' gestart om: ", validPipingCalculation.Name), msgs[2]);