public void BTest() { JsonDB DB = new JsonDB(); DB.InitJsonDB(); //Set var productId = Guid.Empty; var product = new DGDADemo.Product.Models.Product() { Id = productId, Name = "Product 1", Price = 10, Description = "Description 1", InStock = true }; DB.Set(productId, product); var productGet = DB.Get <DGDADemo.Product.Models.Product>(Guid.Empty).ToList(); Assert.AreEqual(product.Name, productGet[0].Name); Assert.AreEqual(product.InStock, productGet[0].InStock); Assert.AreEqual(product.Description, productGet[0].Description); Assert.AreEqual(product.Price, productGet[0].Price); }
public void SetTest() { JsonDB target = new JsonDB(); // TODO: Initialize to an appropriate value Guid key = new Guid(); // TODO: Initialize to an appropriate value object value = null; // TODO: Initialize to an appropriate value bool expected = false; // TODO: Initialize to an appropriate value bool actual; actual = target.Set(key, value); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }