public void Update_with_valid_passstore()
        {
            // arrange
            var mclient = GetMockClient(out Mock <IMongoCollection <PasswordStoreModel> > mcollection);
            var mrepo   = new PassStoreMongo(mclient.Object);
            var model   = new PasswordStoreModel()
            {
                Key        = "key-1",
                Name       = "name-1",
                PassPhrase = "somepwd"
                ,
                IsEncrypted = true,
                EncryptedBy = "1"
            };

            // act
            var rslt = mrepo.Update(model)
                       .GetAwaiter().GetResult();

            // assert
            mclient.VerifyAll();
            mcollection.Verify(mc => mc.UpdateOneAsync(It.IsAny <FilterDefinition <PasswordStoreModel> >(),
                                                       It.IsAny <UpdateDefinition <PasswordStoreModel> >(), default(UpdateOptions), default(CancellationToken)),
                               Times.Once);
        }
        public void Update_with_invalid_data()
        {
            // arrange
            var mclient = GetMockClient(out Mock <IMongoCollection <PasswordStoreModel> > mcollection);
            var mrepo   = new PassStoreMongo(mclient.Object);

            // act and assert
            Assert.Throws <ArgumentNullException>(() => mrepo.Update(null)
                                                  .GetAwaiter().GetResult());
        }