예제 #1
0
        public void ClearDatabase_Returns()
        {
            var stubReader     = new StubIFileReader();
            var stubWriter     = new StubIFileWriter();
            var fileDataAccess = new FileDataAccess <FakeBlogModel>(stubReader, stubWriter);
            var param_filePath = "path/to/the/file.json";

            fileDataAccess.ClearDatabase(param_filePath);
        }
예제 #2
0
        public void ClearDatabase_VerifyWriter()
        {
            var stubReader     = new StubIFileReader();
            var mockWriter     = new MockIFileWriter();
            var fileDataAccess = new FileDataAccess <FakeBlogModel>(stubReader, mockWriter);
            var param_filePath = "path/to/the/file.json";

            fileDataAccess.ClearDatabase(param_filePath);

            mockWriter.VerifyWrite(param_filePath, false, "");
        }