public void InMemoryValuesStore_Create_KeyAlreadyExists()
        {
            // Arrange
            var value = new Value()
            {
                Id = "1", Data = "data"
            };
            var valuesStore = new InMemoryValuesStore();

            valuesStore.Create(value);

            // Act
            Action action = () => valuesStore.Create(value);

            // Assert
            ExceptionAssert.ThrowsApiException(action, ApiExceptionError.ValueAlreadyExists);
        }
        public void InMemoryValuesStore_Delete_Success()
        {
            // Arrange
            var value = new Value()
            {
                Id = "1", Data = "data"
            };
            var valuesStore = new InMemoryValuesStore();

            valuesStore.Create(value);

            // Act
            valuesStore.Delete(value.Id);

            // Assert
            Action action = () => valuesStore.Read(value.Id);

            ExceptionAssert.ThrowsApiException(action, ApiExceptionError.ValueDoesntExist);
        }
        public void InMemoryValuesStore_Create_Success()
        {
            // Arrange
            var value = new Value()
            {
                Id = "1", Data = "data"
            };
            var valuesStore = new InMemoryValuesStore();

            // Act
            valuesStore.Create(value);

            // Assert
            var readValue = valuesStore.Read(value.Id);

            Assert.AreEqual(value.Id, readValue.Id);
            Assert.AreEqual(value, readValue);
            Assert.AreSame(value, readValue);
        }