Example #1
0
        public void AddDataTest()
        {
            DateTime   date   = DateTime.UtcNow;
            DataLogger logger = new DataLogger("mongodb://WHS", "Test");

            DataLog data = new DataLog()
            {
                Type = "TestData", Date = date, JsonData = "{ TestValue = Test}"
            };
            DataLog dataGet = logger.AddData(data);

            List <DataLog> logs = logger.GetData("TestData", null, null);

            Assert.IsNotNull(logs);
            Assert.IsTrue(logs.Count > 0);
        }