public void WriteEntityContactMessage() { var msg = new ContactMessage { From = new Contact { ContactId = "A", DisplayName = "Bob" }, To = new Contact { ContactId = "B", DisplayName = "Jane" }, MessageBody = "Test" }; var context = new OperationContext(); var proxy = new TableEntityProxy<ContactMessage>(msg); var props = proxy.WriteEntity(context); Assert.AreEqual("A", props["FromContactId"].StringValue); Assert.AreEqual("Bob", props["FromDisplayName"].StringValue); Assert.AreEqual("B", props["ToContactId"].StringValue); Assert.AreEqual("Jane", props["ToDisplayName"].StringValue); }
public void WriteEntityContactMessage() { var msg = new ContactMessage { From = new Contact { ContactId = "A", DisplayName = "Bob" }, To = new Contact { ContactId = "B", DisplayName = "Jane" }, MessageBody = "Test" }; var context = new OperationContext(); var proxy = new TableEntityProxy <ContactMessage>(msg); var props = proxy.WriteEntity(context); Assert.AreEqual("A", props["FromContactId"].StringValue); Assert.AreEqual("Bob", props["FromDisplayName"].StringValue); Assert.AreEqual("B", props["ToContactId"].StringValue); Assert.AreEqual("Jane", props["ToDisplayName"].StringValue); }
public void WriteEntityContact() { var contact = new Contact { ContactId = "A", DisplayName = "Bob" }; var context = new OperationContext(); var proxy = new TableEntityProxy<Contact>(contact); var props = proxy.WriteEntity(context); Assert.AreEqual("A", props["ContactId"].StringValue); Assert.AreEqual("Bob", props["DisplayName"].StringValue); }
public void WriteEntityContact() { var contact = new Contact { ContactId = "A", DisplayName = "Bob" }; var context = new OperationContext(); var proxy = new TableEntityProxy <Contact>(contact); var props = proxy.WriteEntity(context); Assert.AreEqual("A", props["ContactId"].StringValue); Assert.AreEqual("Bob", props["DisplayName"].StringValue); }