public void Add_ObjectWithKeyExistsButOverrideExistingValueIsTrue_ExceptionNotThrown()
        {
            //arrange
            var myObject = new FakeClass();
            _collection.Add("MyKey", myObject, true);

            //act
            _collection.Add("MyKey", new FakeClass(), true);
        }
        public void Add_ObjectWithKeyAlreadyAdded_ExceptionThrown()
        {
            //arrange
            var myObject = new FakeClass();
            _collection.Add("MyKey", myObject);

            //act
            _collection.Add("MyKey", new FakeClass());
        }
        public void Get_ObjectWithKeyMyKeyAdded_ReturnValueIsObject()
        {
            //arrange
            var myObject = new FakeClass();
            _collection.Add("MyKey", myObject);

            //act
            var returnValue = _collection.Get("MyKey");

            //assert
            Assert.AreEqual(myObject, returnValue);
        }
        public void Get_ObjectWithKeyExistsButOverrideExistingValueIsTrue_NewestObjectReturned()
        {
            //arrange
            var myObject = new FakeClass();
            var newObject = new FakeClass();
            _collection.Add("MyKey", myObject, true);
            _collection.Add("MyKey", newObject, true);

            //act
            var returnValue = _collection.Get("MyKey");

            //assert
            Assert.AreEqual(newObject, returnValue);
        }
 public void DomainEntityComparer_ComparedOnClassNotHandledByEqualsMethod_ThrowsException()
 {
     var fakeClassForTesting = new FakeClass();
     var sut = new DomainEntityComparer();
     sut.Equals(fakeClassForTesting, fakeClassForTesting);
 }