Ejemplo n.º 1
0
        public void RecordExists_InvalidKey_ShouldReturnBadRequest(string key)
        {
            var response = sut.RecordExists(key, 1);

            Assert.Equal(System.Net.HttpStatusCode.BadRequest, response.Status);
            Assert.False(response.IsSuccessStatusCode);
        }
Ejemplo n.º 2
0
        public void RecordExists_Invalid_ShouldReturnFalse(string key, int column)
        {
            File.Delete(@"test.txt");
            var sut = new ReadWriteCSV("test.txt", ';');
            //sut.AddRecord("1;2;3");
            //sut.AddRecord("a;b;c");
            var response = sut.RecordExists(key, column);

            Assert.False(response.Result);
            Assert.True(response.IsSuccessStatusCode);
        }