Exemplo n.º 1
0
        public void DataControllerInsertMethodTests(string key, string value)
        {
            // arrange
            var settings = new TestDataControllerSettings {
                EnableEncryption = false
            };
            DataController sut = new DataController(settings);

            // act
            sut.Insert(key, value);

            // assert
            sut.ContainsKey(key).Should().BeTrue();
            sut.Lookup(key).Should().Be(value);
        }
Exemplo n.º 2
0
        public void ConstructorWithCustomSettingsTest()
        {
            // arrange
            var settings = new TestDataControllerSettings {
                EnableEncryption      = false,
                FileNamePrefix        = "test",
                FileNameExtension     = "dddb",
                KeyValuePairDelimiter = ':'
            };
            DataController sut;

            // act
            sut = new DataController(settings);

            // assert
            sut.Should().NotBeNull();
        }