public void AddSmartDeviceToCollection_CheckIfSmartDeviceIsAddedToDatabase() { SmartDevice smartDevice = new SmartDevice { Id = ObjectId.Parse("5cab1c95187374a2581069cf"), Name = "TEST" }; _context.AddSmartDeviceToCollection(smartDevice); var result = _context.GetSmartDevicesCollection("Name"); var addedSmartDevice = result.Where(z => z.Id == smartDevice.Id).FirstOrDefault(); Assert.That(() => addedSmartDevice != null); _context.DeleteSmartDeviceFromCollection(smartDevice.Id); }
public void DeleteSmartDevice(string id) { ObjectId _id = ObjectId.Parse(id); _context.DeleteSmartDeviceFromCollection(_id); }