public void Delete_WithNonStoredObject_Throws()
        {
            // Arrange
            var testObject = new SimpleTestObject();

            // Act
            // Assert
            Assert.Throws<ArgumentException>(() => _objectStore.Delete(testObject));
        }
        public void Delete_WithStoredObject_RemovesObjectFromStore()
        {
            // Arrange
            var testObject = new SimpleTestObject();
            _objectStore.Insert(testObject);

            // Act
            _objectStore.Delete(testObject);

            // Assert
            Assert.AreEqual(0, _objectStore.Count);
        }
        public void Replace_WithValidObjects_ReplacesValueInStore()
        {
            // Arrange
            var fakeObject = new SimpleTestObject { Id = 1, Name = "Some object" };
            _objectStore.Insert(fakeObject);

            var changedObject = new SimpleTestObject { Id = 1, Name = "Same object with changed values" };

            // Act
            _objectStore.Replace(fakeObject, changedObject);

            // Assert
            Assert.AreEqual(1, _objectStore.Count);
            Assert.Contains(changedObject, _objectStore.ToList());
        }
        public void Replace_WithNullOldObject_Throws()
        {
            // Arrange
            var changedObject = new SimpleTestObject { Id = 1, Name = "Same object with changed values" };

            // Act
            // Assert
            Assert.Throws<ArgumentNullException>(() => _objectStore.Replace(null, changedObject));
        }
        public void Replace_WithNullNewObject_Throws()
        {
            // Arrange
            var fakeObject = new SimpleTestObject { Id = 1, Name = "Some object" };
            _objectStore.Insert(fakeObject);

            // Act
            // Assert
            Assert.Throws<ArgumentNullException>(() => _objectStore.Replace(fakeObject, null));
        }
        public void Replace_WithInValidObjects_Throws()
        {
            // Arrange
            var fakeObject = new SimpleTestObject { Id = 1, Name = "Some object" };
            var changedObject = new SimpleTestObject { Id = 1, Name = "Same object with changed values" };

            // Act
            // Assert
            Assert.Throws<ArgumentException>(() => _objectStore.Replace(fakeObject, changedObject));
        }
        public void Insert_WithObject_AddsObjectToStore()
        {
            // Arrange
            var testObject = new SimpleTestObject();

            // Act
            _objectStore.Insert(testObject);

            // Assert
            Assert.AreEqual(1, _objectStore.Count);
        }