public void Test()
        {
            var word       = "Mädchen";
            var actualWord = JSectionReader.Section("Example3Encoding.json", Encoding.UTF8).GetSection("words", 2).GetObject <string>();

            Assert.AreEqual(word, actualWord);
        }
        public void Test(string testCaseName, string fileName, Encoding encoding, List <string> expected)
        {
            var section = JSectionReader.Section(fileName, encoding).GetSection("table");
            var result  = section.GetTableAsObjectList <string, string>((val) => val);

            result.Should().BeEquivalentTo(expected);
        }
Exemplo n.º 3
0
        public void Test()
        {
            var person = JSectionReader.Section("Example5ReadingObject.json").GetSection("person").GetObject <Person>();

            Assert.AreEqual("richard", person.Name);
            Assert.AreEqual(22, person.Age);
        }
        public void Test3()
        {
            var actualWord = JSectionReader
                             .Section("Boo.Example4FileDiscovery.json")
                             .GetSection("animal").GetObject <string>();

            Assert.AreEqual("elephant", actualWord);
        }
        public void Test()
        {
            var numbers = JSectionReader.Section("Example6ReadingList.json").GetSection("numbers").GetObject <List <int> >();

            CollectionAssert.AreEqual(new List <int>()
            {
                5, 4, 3, 2, 1
            }, numbers);
        }
 public void Setup()
 {
     _runner  = MongoDbRunner.Start();
     testData = JSectionReader.Section("AirTravel.json", Encoding.UTF8);
 }
 public void AirTravelCollectionMongoDbSetUp()
 {
     travelCollection = new MongoClient(_connectionString).GetDatabase("testdb").GetCollection <AirTravel>("travel");
     testData         = JSectionReader.Section("AirTravel.json", Encoding.UTF8);
 }
 public void Setup()
 {
     _runner         = MongoDbRunner.Start();
     mongoCollection = new MongoClient(_runner.ConnectionString).GetDatabase("testdb").GetCollection <Test>("testcollection");
     testData        = JSectionReader.Section("AirTravel.json", Encoding.UTF8);
 }
        public void Test()
        {
            var name = JSectionReader.Section("Example2Sectioning.json").GetSection("employees", 1, "name").GetObject <string>();

            Assert.AreEqual("richard", name);
        }
Exemplo n.º 10
0
        public void Test2()
        {
            var name = JSectionReader.Section("Example1Sectioning.json", Encoding.Default, "name").GetObject <string>();

            Assert.AreEqual("john", name);
        }
        public void Setup()
        {
            _runner = MongoDbRunner.Start();

            testData = JSectionReader.Section("movieDetailsTestData.json", Encoding.UTF8);
        }