public void GetUnknownAttribute_Should_ReturnEmptyString() { var store = new ClientDetailsStore(); AwsClientDetails clientDetails = store.Load(Container); SimpleDBHelper helper = new SimpleDBHelper(clientDetails); const string domainName = "TestDomain"; const string itemName = "TesItem"; const string attributeName = "UnknownAttributeThatDoesntExist"; string expectedValue = string.Empty; // Ensure the domain exists and store the test item. helper.CreateDomain(domainName); string actualValue = helper.GetAttribute(domainName, itemName, attributeName); Assert.AreEqual(expectedValue, actualValue); }
public void GetAttribute_Should_Succeed() { var store = new ClientDetailsStore(); AwsClientDetails clientDetails = store.Load(Container); SimpleDBHelper helper = new SimpleDBHelper(clientDetails); const string domainName = "TestDomain"; const string itemName = "TesItem"; const string attributeName = "attributeName"; string expectedValue = DateTime.Now.ToLongTimeString(); // Ensure the domain exists and store the test item. helper.CreateDomain(domainName); helper.PutAttribute(domainName, itemName, attributeName, true, expectedValue); string actualValue = helper.GetAttribute(domainName, itemName, attributeName); Assert.AreEqual(expectedValue, actualValue); }