public Publisher Save_Notification(string id, Model.Publisher notification) { notification.TimeStamp = DateTime.Now; pubData.InsertOne(notification); UpdateNotificationCount(); return(notification); }
public void Test_Publisher_Translator_DataContractToModel() { ServiceLayer.DataContract.Publisher contract_publisher = new ServiceLayer.DataContract.Publisher(); Model.Publisher model_publisher = new Model.Publisher(); var result = ServiceLayer.Translators.PublisherTranslator.DataContractToModel(contract_publisher); Assert.IsInstanceOfType(model_publisher, result.GetType()); }
public void Fail_Test_Publisher_without_Translators() { ServiceLayer.DataContract.Publisher contract_publisher = new ServiceLayer.DataContract.Publisher(); Model.Publisher model_publisher = new Model.Publisher(); Assert.IsNotInstanceOfType(contract_publisher, model_publisher.GetType()); }