Search Results

Search found 185 results on 8 pages for 'mohit deshpande'.

Page 6/8 | < Previous Page | 2 3 4 5 6 7 8  | Next Page >

  • Why Moq is throwing "expected Invocation on the mock at least once". Where as it is being set once,e

    - by Mohit
    Following is the code. create a class lib add the ref to NUnit framework 2.5.3.9345 and Moq.dll 4.0.0.0 and paste the following code. Try running it on my machine it throws TestCase 'MoqTest.TryClassTest.IsMessageNotNull' failed: Moq.MockException : Expected invocation on the mock at least once, but was never performed: v = v.Model = It.Is(value(Moq.It+<c__DisplayClass21[MoqTest.GenInfo]).match) at Moq.Mock.ThrowVerifyException(IProxyCall expected, Expression expression, Times times, Int32 callCount) at Moq.Mock.VerifyCalls(Interceptor targetInterceptor, MethodCall expected, Expression expression, Times times) at Moq.Mock.VerifySet[T](Mock1 mock, Action1 setterExpression, Times times, String failMessage) at Moq.Mock1.VerifySet(Action`1 setterExpression) Class1.cs(22,0): at MoqTest.TryClassTest.IsMessageNotNull() using System; using System.Collections.Generic; using System.Linq; using System.Text; using Moq; using NUnit.Framework; namespace MoqTest { [TestFixture] public class TryClassTest { [Test] public void IsMessageNotNull() { var mockView = new Mock<IView<GenInfo>>(); mockView.Setup(v => v.ModuleId).Returns(""); TryPresenter tryPresenter = new TryPresenter(mockView.Object); tryPresenter.SetMessage(new object(), new EventArgs()); // mockView.VerifySet(v => v.Message, Times.AtLeastOnce()); mockView.VerifySet(v => v.Model = It.Is<GenInfo>(x => x != null)); } } public class TryPresenter { private IView<GenInfo> view; public TryPresenter(IView<GenInfo> view) { this.view = view; } public void SetMessage(object sender, EventArgs e) { this.view.Model = null; } } public class MyView : IView<GenInfo> { #region Implementation of IView<GenInfo> public string ModuleId { get; set; } public GenInfo Model { get; set; } #endregion } public interface IView<T> { string ModuleId { get; set; } T Model { get; set; } } public class GenInfo { public String Message { get; set; } } } And if you change one line mockView.VerifySet(v => v.Model = It.Is<GenInfo>(x => x != null)); to mockView.VerifySet(v => v.Model, Times.AtLeastOnce()); it works fine. I think Exception is incorrect.

    Read the article

  • Trouble with Google Finance API

    - by BANSAL MOHIT
    When i am trying to buy shares using google finance api i am getting an exception. Please help run: Enter user ID: **@gmail.com Enter user password: ** Enter transaction type: Buy Enter transaction date (yyyy-mm-dd): 2010-03-10 Enter number of shares (optional, e.g. 100.0): Enter price (optional, e.g. 141.14): 12.0 Enter commission (optional, e.g. 20.0): 23.0 Enter currency (optional, e.g. USD, EUR, JPY): USD Enter any notes: Notes Enter portfolio ID: 1 Enter ticker (EXCHANGE:SYMBOL): NASDAQ:INFY Inserting Entry at location: http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ:INFY/transactions The server had a problem handling your request. com.google.gdata.util.ServiceForbiddenException: Forbidden Exception message unavailable at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:561) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535) at com.google.gdata.client.Service.insert(Service.java:1347) at com.google.gdata.client.GoogleService.insert(GoogleService.java:599) at financetester.Main.insertTransactionEntry(Main.java:169) at financetester.Main.main(Main.java:81) BUILD SUCCESSFUL (total time: 1 minute 4 seconds)

    Read the article

  • How do I increase timeout for a cronjob/crontab?

    - by Mohit Ranka
    I have written a script that gets data from solr for which date is within the specified period, and I run the script using as a daily cron. The problem is the cronjob does not complete the task. If I manually run the script (for the same time period), it works well. If I reduce the specified time period, the script runs from the cron as well. So my guess is cronjob is timing out while running the script is there is much data to process. How do I increase the timeout for cronjob? PS - 1. The script I am running in cronjob is a bash script which runs a python script.

    Read the article

  • Outlook 2003 Addons

    - by Mohit Nanda
    I want to create a custom Addon/plugin for Outlook 2003, to support integrated functionality with a task management system. I am unable to find many good development resources for the same. Can someone please explain Outlook 2003 architecure and development of a plugin. Good links/resources are also welcome.

    Read the article

  • MP3 Encoding in Java

    - by Mohit Nanda
    I need an OpenSource API in Java, which can encode *.wav and *.au formats to MP3, and vice-versa. Have evaluated Java Sound API, and LameOnJ, but they dont meet the requirements and aint stable, respectively. Please suggest one that is free, and platform independent.

    Read the article

  • ubuntu package installation

    - by mohit
    what is difference between "apt-get install apache2" and "aptitude install apache2" in ubuntu and where each of them install the package.. apt-get install ... , i guess nstall in /etc/ what about aptitude install ....

    Read the article

  • Minix3 on Vmware

    - by mohit
    Hi, I install minix3 on vmware using installation CD i make using .iso image which is available @minix3 I make 2GB Harddisk, 512MB RAM on VMware, and installed step-by-step. It got installed and working fine. But i wana install 'packman' which is X window system. I'm not able to install it. It asks for installation CD, its still there and its detected also, but i couldn't proceed. Have any1 tried installing 'packman' i.e X window system on minix3. Please guide me. :)

    Read the article

  • Regular Expression to validate a timestamp

    - by Mohit Nanda
    Hi, I need a regular expression to validate a timestamp of the format, using Javascript: YYYY/MM/DD HH:MI:SS I tried cooking up a few, but seems my regex skills fail to cover something or other. Please give me a reference or way to do it. P.S. : I mention regex, only as a suggestion. Im using Javascript and welcome any alternative.

    Read the article

  • What is a good project structure in C

    - by mohit
    Hi, I have been working in Java/J2ee projects, in which I follow the Maven structure. I want to develop [say a command line interpreter in linux {ubuntu}] in C. I never develop projects in C. I want to know what project structure I should follow.

    Read the article

  • Self join to a table

    - by Mohit
    I have a table like Employee ================== name salary ================== a 10000 b 20000 c 5000 d 40000 i want to get all the employee whose salary is greater than A's salary. I don't want to use any nested or sub query. It has been asked in an interview and hint was to use self join. I really can't figure out how to achieve the same.

    Read the article

  • What is the Good project Structure in C

    - by mohit
    Hi, I have been working in Java/J2ee projects, in which i follow maven structure. I want to develop [say a command line interpreter in linux {ubuntu}] in C. I never develop projects in C. I want to know what project structure should i follow.

    Read the article

  • Flex ItemRenderer/Editor ComboBox Issue...Puhleezz Help

    - by Mohit
    Hi EveryOne Beginner in Flex ...Even worse with item renderers... Have managed to add a Combobox to a datagrid using a itemEditor... I want to change the options in a combo box depending on the value selected by the user on a previous combo.. In the combo box i want to display a certain value (Model Name ) but for quering a table i'll pass the corresponding code of the model :(... sounds simple enough ..unfortunately not able to implement it I have found this problem on this site but the solution seems an overkill for my "small" problem..was hoping if anyone could guide me towards a more simpler solution... My xml comes as <item><mstValue>CH1</mstValue><mstRemarks>CARRIER</mstRemarks></item> <item><mstValue>CH2</mstValue><mstRemarks>TRANS</mstRemarks></item> <item><mstValue>CH3</mstValue><mstRemarks>YORK</mstRemarks></item> Now i have been able to show the values in a combo .if user selects CARRIER i want to pass CH1(dont know how to do it with itemeditors)...and then fetch values corresponding to CH1 from a table (second part of the problem)...in the sample below i used this.parentDocument.modelComboChanged(this.selectedItem) to pass the selected value ...instedd i need to pass the code for it which comes from the xml...Pls help this making me go crazy.... <mx:DataGrid id="chillerGrid" dataProvider="{chillerGridDp}" editable="true" itemRollOver="{ComponentUtil.setTooltip(event,this)}" itemRollOut="ComponentUtil.resetTooltip(event)" width="70%" height="160"> <mx:columns> <mx:DataGridColumn id="test" headerText="Model" dataField="model" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();};this.parentDocument.modelComboChanged(this.selectedItem)}" dataProvider="{this.parentDocument.arrColl1}" text="mstRemarks" labelField="mstRemarks" editable = "false" > <!--<mx:dataProvider > <mx:String></mx:String> <mx:String>Model1</mx:String> <mx:String>Model2</mx:String> <mx:String>Model3</mx:String> <mx:String>Model4</mx:String> <mx:String>Model5</mx:String> </mx:dataProvider>--> </mx:ComboBox> <!--<components:ComboBoxIn dataProvider="{this.parentDocument.arrColl1}" labelField="mstRemarks" /> --> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Make" dataField="make" editorDataField="value" editable="true" backgroundColor="#f4f2bd" width="100" > <mx:itemEditor> <mx:Component> <mx:ComboBox creationComplete="{if(text=='')selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();}" change="{if(text == ''){selectedIndex=0;if(data &amp;&amp; data.contactType!=undefined)text=data.contactType.text();} }" labelField="@label" editable = "false" > <mx:dataProvider> <mx:String></mx:String> <mx:String>Carrier</mx:String> <mx:String>York</mx:String> <mx:String>Trane</mx:String> </mx:dataProvider> </mx:ComboBox> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> <mx:DataGridColumn headerText="Chillers" dataField="chillers" width="200" editable="true"> <mx:itemEditor> <mx:Component> <mx:TextInput maxChars="49" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> </mx:columns> </mx:DataGrid>

    Read the article

  • Understanding Virtualization

    - by mohit
    Hi, I wana to know about Virtualization in detail. But start from basics, like what is virtualization, with real world examples and scenarios. When ever i search, i got Virtualization technologies, but i want to learn and in fcat know what exactly is virtualization, its types n all..... Please help me in getting practical details of term "Virtualization"

    Read the article

  • difference between AJAX POST and GET

    - by Mohit Kumar
    $.ajax({ type: 'POST', url: path, data: '{AreaID: ' + parentDropdownList.val() + '}', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function(response) { } }); In above code I am using type: 'POST'. My senior told me that I also can use 'GET' in type. But dint find the difference between 'POST' and 'GET' and I also want to know what is the use of type, contentType, and dataType. Could anyone one explain me why we use these type, contentType and dataType. Thanks in advance.

    Read the article

  • functional test for rails controller private method

    - by mohit
    I have a private method in my controller. which is used for some database update. this method i am calling from another controller method. and it works fine. But when i am trying to write a test case for that method then It is tripping on accessing (session variable and params) in my functional all other methods are working fine the problem is only with private method? In my setup method in functional test, I am setting session also.?

    Read the article

  • apache derby database

    - by mohit
    i am building a swing application with apache derby database as back end in netbeans 6.8 with my friend.He is making the databse in derby while i am making the front end i.e. frames. now how do i use database created by him in my project in netbeans 6.8 my motive is to how we insert a already build databse(from my friend's netbeans) into the the services tab of my application.

    Read the article

  • ASP.NET Web Custom Controls

    - by Mohit Kumar
    Hello Experts, I am Beginner. I want to study and create custom controls. I have searched on Google but didn't find any good stuff. Could anybody provide me some nice link or explain me that how can I start custom controls. Thanks in advance.

    Read the article

< Previous Page | 2 3 4 5 6 7 8  | Next Page >