Commits

Mike Podonyi  committed d00c3ef

UnitTest fixes

  • Participants
  • Parent commits d6f7a69

Comments (0)

Files changed (5)

File src/Empi.Camino.Test/DataStoreFactoryTest.cs

             DummyObject dummy2;
             dataStore.TryGet("testdummy", out dummy2);
 
-            Assert.AreEqual(dummy, dummy2);
+            Assert.AreSame(dummy, dummy2); 
 
             Assert.AreEqual(dummy.DummyValue, dummy2.DummyValue);
 
 
             dataStore.Remove("testdummy");
 
-            Assert.AreEqual(dataStore.TryGet("testdummy", out dummy2),false);
+            Assert.IsFalse(dataStore.TryGet("testdummy", out dummy2));
 
             dataStore.Remove("testdictionary");
 
 
             //LazyGet Test
 
-            Assert.AreEqual(dataStore.TryGet("testdummy3", out dummy2),false);
-
+            Assert.IsFalse(dataStore.TryGet("testdummy3", out dummy2));
+            
             DummyObject expected=new DummyObject("testvalue");
 
             DummyObject actual = dataStore.LazyGet("testdummy3", () => expected);
 
             Assert.AreEqual(actual.DummyValue, expected.DummyValue);
 
-            Assert.AreEqual(dataStore.TryGet("testdummy3", out dummy2), true);
+            Assert.IsTrue(dataStore.TryGet("testdummy3", out dummy2));
 
             Assert.AreSame(expected, dummy2);
         }
 
         //MP:Test NoCache
 
-        /// <summary>
-        ///A test for GetDataStore
-        ///</summary>
         [TestMethod()]
         [HostType("ASP.NET")]
         [DeploymentItem("Empi.Camino.dll")]
             GetDataStoreTestInternal(DataStoreFactory.GetApplicationDataStore);
         }
 
-        /// <summary>
-        ///A test for GetDataStore
-        ///</summary>
         [TestMethod()]
         [HostType("ASP.NET")]
         [DeploymentItem("Empi.Camino.dll")]
             GetDataStoreTestInternal(DataStoreFactory.GetSessionDataStore);
         }        
                 
-        /// <summary>
-        ///A test for GetDataStore
-        ///</summary>
         [TestMethod()]
         [HostType("ASP.NET")]
         [DeploymentItem("Empi.Camino.dll")]
             GetDataStoreTestInternal(DataStoreFactory.GetItemsDataStore);
         }        
         
-        /// <summary>
-        ///A test for GetDataStore
-        ///</summary>
         [TestMethod()]
         [HostType("ASP.NET")]
         [DeploymentItem("Empi.Camino.dll")]
             GetDataStoreTestInternal(DataStoreFactory.GetCacheDataStore);
         }
 
-        /// <summary>
-        ///A test for GetDataStore Cache disabled
-        ///</summary>
         [TestMethod()]
         [HostType("ASP.NET")]
         [DeploymentItem("Empi.Camino.dll")]

File src/Empi.Camino.Test/RetailerSettingsTest.cs

         #endregion
 
 
-        /// <summary>
-        ///A test for GetRetailerSettings
-        ///</summary>
         [TestMethod()]
         [DeploymentItem("Empi.Camino.dll")]
         public void GetRetailerSettingsTest()

File src/Empi.Camino.Test/SettingsTest.cs

         {}
 
 
-		/// <summary>
-		///A test for MyDbId
-		///</summary>
 		[TestMethod()]
 		[Description("Test that the Test ID comes back.")]
 		[DeploymentItem("Empi.Camino.dll")]
 			Assert.AreEqual<string>("Logrono", actual);
 		}
 
-		/// <summary>
-		///A test for MetaDataBaseConnectionString
-		///</summary>
 		[TestMethod()]
 		[Description("Test that the Test MetaDataBaseConnectionString comes back.")]
 		[DeploymentItem("Empi.Camino.dll")]
 			Assert.AreEqual<string>("sdafgreg", actual);
 		}
 
-        /// <summary>
-        ///A test for MyDbState
-        ///</summary>
         [TestMethod()]
         [DeploymentItem("Empi.Camino.dll")]
         public void MyDbStateTest()
             Assert.AreEqual<string>("Dev", actual);
         }
 
-        /// <summary>
-        ///A test for MyDbState
-        ///</summary>
         [TestMethod()]
         [DeploymentItem("Empi.Camino.dll")]
         public void EnableCacheTest()
         }
 
 
-        /// <summary>
-        ///A test for GetRetailerSettings
-        ///</summary>
         [TestMethod()]
         [DeploymentItem("Empi.Camino.dll")]
         public void SettingsPropertyDiscoveryTest()
 
             Assert.IsTrue(testProperty.IsReadOnly);
 
-            StringAssert.Equals(testProperty.DefaultValue, "dummyValue");
+            Assert.AreEqual(testProperty.DefaultValue, "dummyValue");
 
-            StringAssert.Equals(testProperty.Name, "Retailer-Dummytest");
+            Assert.AreEqual(testProperty.Name, "Retailer-Dummytest");
 
             Assert.AreEqual(typeof(string), testProperty.PropertyType);
 
 
             Assert.IsTrue(testProperty.ThrowOnErrorSerializing);
 
-            Assert.Equals(testProperty.SerializeAs, SettingsSerializeAs.String);
+            Assert.AreEqual(testProperty.SerializeAs, SettingsSerializeAs.String);
 
             Assert.IsInstanceOfType(testProperty.Provider, typeof(CaminoSettingsProvider));
 
 
             //MP: more Tests here
         }
+
 	}
 }

File src/Empi.Camino.Test/UtilsTest.cs

         }
 
         /// <summary>
-        ///A test for SubstituteStringTemplate
+        /// Tests the Throwing of an Exception when option is set for SubstituteStringTemplate
         ///</summary>
         [TestMethod()]
         [DeploymentItem("Empi.Camino.dll")]

File src/Empi.Camino/Configuration/Settings.cs

                     this._init.IsReadOnly = false;
                     this._init.PropertyType = null;
                     this._init.Provider = this.Providers["CaminoSettingsProvider"];
+                    this._init.ThrowOnErrorDeserializing = true;
+                    this._init.ThrowOnErrorSerializing = true;
                 }
                 return this._init;
             }