Пример #1
0
 public Publisher Save_Notification(string id, Model.Publisher notification)
 {
     notification.TimeStamp = DateTime.Now;
     pubData.InsertOne(notification);
     UpdateNotificationCount();
     return(notification);
 }
Пример #2
0
        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());
        }
Пример #3
0
 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());
 }