public void findAllCommentsArroundTest()
 {
     Locations location = new Locations();
     Codes code = new Codes();
     Comments comment = new Comments();
     List<Comments> comments = new List<Comments>();
     location.id = 20;
     location.latitude = 25;
     location.longitude = 20;
     code.code = "7DE352BC35E966716789926415D69D96";
     code.id = 5;
     comment.archiveDescription = "archive";
     comment.description = "descr";
     comment.id = 30;
     comment.isText = true;
     comment.locationsId = 23;
     comment.userId = 10;
     comments.Add(comment);
     iLocationServices.Setup(m => m.findLocationByLatAndLng(It.IsAny<string>(), It.IsAny<string>())).Returns(location);
     iCommentServices.Setup(m => m.findCommentByIdLocation(It.IsAny<int>())).Returns(comments);
     iCodeServices.Setup(m => m.findFirstCode()).Returns("code");
     CommentsWebServicesController target = new CommentsWebServicesController(iCodeServices.Object, iLocationServices.Object, iCommentServices.Object);
     string actual = target.findAllCommentsArround(null, "3", "7DE352BC35E966716789926415D69D96");
     Assert.IsNull(actual);
 }
 public void addCommentoToLocationTest()
 {
     iCodeServices.Setup(m => m.findFirstCode()).Returns("code");
     CommentsWebServicesController target = new CommentsWebServicesController(iCodeServices.Object, iLocationServices.Object, iCommentServices.Object);
     string location = string.Empty;
     string comment = string.Empty;
     string code = string.Empty;
     string expected = string.Empty;
     string actual;
     actual = target.addCommentoToLocation(null, null, "7DE352BC35E966716789926415D69D96");
     Assert.AreEqual("0", actual);
 }
 public void addComentAndSoundToLocation(string location, byte[] sound, Comments comments, string code)
 {
     Comments commentPassed = new Comments();
     commentPassed.sound = convertBytesToString(sound);
     commentPassed.typeOfCommentsId = comments.typeOfCommentsId;
     commentPassed.isText = comments.isText;
     commentPassed.userId = comments.userId;
     commentPassed.description = comments.description;
     string comment = serializer.Serialize(commentPassed);
     CommentsWebServicesController commentsWebServicesController = new CommentsWebServicesController();
     commentsWebServicesController.addCommentAndSoundToLocation(location, comment, code);
 }