public void Insert_OrderCrudOperation() { // Arrange var provider = new SqliteProvider(_context); // Act // Insert test order detail. provider.Insert(new Order { Latitude = Latitude, Longitude = Longitude, OrderTitle = OrderTitle, Status = Status }); // Fetch inserted order detail. var orders = provider.GetAll(); // Validate Assert.Equal(1, orders.Count); Assert.Equal(Latitude, orders.First().Latitude); Assert.Equal(Longitude, orders.First().Longitude); Assert.Equal(OrderTitle, orders.First().OrderTitle); Assert.Equal(Status, orders.First().Status); // Fetch Order var orders1 = provider.GetAll().First(); // Update Order var newOrder = new Order { Id = orders1.Id, Latitude = Latitude2, Longitude = Longitude2, Status = orders1.Status, OrderTitle = orders1.OrderTitle }; provider.Update(newOrder); // Fetching Updated Order var orders2 = provider.GetAll(); // Validate Assert.Equal(1, orders2.Count); Assert.Equal(Latitude2, orders2.First().Latitude); Assert.Equal(Longitude2, orders2.First().Longitude); Assert.Equal(OrderTitle, orders2.First().OrderTitle); Assert.Equal(Status, orders2.First().Status); // Remove Test Records foreach (var order in orders) { provider.Remove(order); } // Fetch order detail. var orders3 = provider.GetAll(); // Validate Assert.Equal(0, orders3.Count); }