public void RetrieveAllUserData() { IUsersStorageProviderV40 prov = GetProvider(); Assert.AreEqual(0, prov.RetrieveAllUserData(new UserInfo("Inexistent", "Inex", "*****@*****.**", true, DateTime.Now, prov)).Count, "Wrong data count"); UserInfo user1 = prov.AddUser("user1", "User1", "password", "*****@*****.**", true, DateTime.Now); UserInfo user2 = prov.AddUser("user2", "User2", "password", "*****@*****.**", true, DateTime.Now); Assert.AreEqual(0, prov.RetrieveAllUserData(user1).Count, "Wrong data count"); prov.StoreUserData(user1, "Key", "Value"); prov.StoreUserData(user1, "Key2", "Value2"); prov.StoreUserData(user2, "Key", "Value3"); IDictionary <string, string> data = prov.RetrieveAllUserData(user1); Assert.AreEqual(2, data.Count, "Wrong data count"); Assert.AreEqual("Value", data["Key"], "Wrong data"); Assert.AreEqual("Value2", data["Key2"], "Wrong data"); }
public void RetrieveAllUserData_NullUser() { IUsersStorageProviderV40 prov = GetProvider(); prov.RetrieveAllUserData(null); }