public void FederalTest_HashEqualIdHash()
        {
            var s1 = new FederalState();

            s1.Guid = Guid.NewGuid();

            Assert.AreEqual(s1.GetHashCode(), s1.Guid.GetHashCode());
        }
        public void FederalTest_IsNotEqual()
        {
            var s1 = new FederalState();

            s1.Guid = Guid.NewGuid();

            var s2 = new FederalState();

            s2.Guid = Guid.NewGuid();

            Assert.AreNotEqual(s1, s2);
            Assert.IsFalse(s1 == s2);
        }
        public void FederalTest_IsEqual()
        {
            var testId = Guid.NewGuid();

            var s1 = new FederalState();

            s1.Guid = testId;

            var s2 = new FederalState();

            s2.Guid = testId;

            Assert.AreEqual(s1, s2);
            Assert.IsTrue(s1 == s2);
        }
        public void FederalTest_Linq()
        {
            var testId = Guid.NewGuid();

            var s1 = new FederalState();

            s1.Guid = testId;

            var s2 = new FederalState();

            s2.Guid = testId;

            var l1 = new[] { s1 };
            var l2 = new[] { s2 };

            Assert.AreEqual(l1.Except(l2).Count(), 0);
        }
예제 #5
0
 /// <summary>
 /// Saves the federal state based on the object/poco
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public bool Save(FederalState obj)
 {
     return(federalStateRepository.Save(obj));
 }
예제 #6
0
 /// <summary>
 /// Deletes the federal state
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public bool Delete(FederalState obj)
 {
     return(federalStateRepository.Delete(obj));
 }