public async Task DeleteCard() { var card = new Card("Solomon is a", "human", "0", Guid.NewGuid()); await mongo.AddCard(card); await mongo.DeleteCard(card.Id); Assert.IsNull(await mongo.FindCard(card.Id)); }
public static async Task Clear(this MongoCardStorage mongo) { foreach (var card in await mongo.GetAllCards()) { await mongo.DeleteCard(card.Id); } foreach (var collection in await mongo.GetAllCollections()) { await mongo.DeleteCollection(collection.Id); } }