Beispiel #1
0
        public void GetDataFileAsJObject_SimpleString(string filename, string expectedValue)
        {
            JObject expected = JObject.Parse(expectedValue);

            string  path   = Path.Join("Tools/TestingTools/GetDataFileAsJObject", filename);
            JObject actual = TestingTools.GetDataFileAsJObject(path);

            Assert.Equal(expected, actual, new JTokenEqualityComparer());
        }
Beispiel #2
0
 public void GetDataFileAsJObject_NonexistingFile()
 {
     Assert.Throws <FileNotFoundException>(
         () => TestingTools.GetDataFileAsJObject("NonExistingFile.json")
         );
 }
Beispiel #3
0
 public void GetDataFileAsJObject_Null()
 {
     Assert.Throws <ArgumentNullException>(
         () => TestingTools.GetDataFileAsJObject(null)
         );
 }