Click here to Skip to main content
16,012,153 members

Comments by amritbdk (Top 8 by date)

amritbdk 3-Mar-14 4:30am View    
Hi Pls find my code bellow.I hve used several assert method pls guide me which one i will use


[TestMethod]
public void SaveUpdateAboutTest()
{
AboutConcept concept = new AboutConcept();
ResponseMessage currentresult;
int expected = 0;
int actual;
using (ShimsContext.Create())
{

concept.BrandId = 1;
concept.ConceptId = 1;
concept.ConceptHow.ConceptId = 1;
concept.ConceptHow.Formula = "nice";
concept.ConceptHow.Manufaturing = "nice";
concept.ConceptHow.Package = "good";
concept.ConceptHow.PromotionalElementsValue = "2";
concept.ConceptHow.SecondaryPackagingValue = "1";
// ShimDateTime.NowGet = () => new DateTime(2012, 12, 31);
concept.ConceptInfo.ConceptCreateDate = DateTime.Now;
concept.ConceptInfo.ConceptId = 1;
concept.ConceptInfo.ConceptInitiator = "gg";
concept.ConceptInfo.InnovationType = "gd";
concept.ConceptInfo.PrivacyLevel = "strng";
concept.ConceptInfo.ProductLaunchStream = "vv";
concept.ConceptInfo.TechnologyPlatform = ".net";
concept.ConceptWhat.BenefitBasedPlatformId = 1;
concept.ConceptWhat.ConceptDescription = "gd";
concept.ConceptWhat.ConceptId = 1;
concept.ConceptWhat.ConceptName = "ap";
var obj = new List<decimal>();

concept.ConceptWhat.CorporateInnovationPlatFromIds = obj;
var obj22 = new Nullable<decimal>();
concept.ConceptWhat.Form = obj22;

concept.ConceptWhat.Holiday = 5;
concept.ConceptWhat.HolidayName = "sun";
concept.ConceptWhat.MbcId = 3;
concept.ConceptWhat.StrCrptPltInnIds = "1";
concept.ConceptWhat.SubCategoryId = 1;
concept.ConceptWhen.ConceptId = 1;

concept.ConceptWhen.ProgramAporovalDueDate = DateTime.Now;
concept.ConceptWhen.TargetOncounterDate = DateTime.Now;
concept.ConceptWhere.Comment = "gud";
concept.ConceptWhere.ConceptId = 1;
concept.ConceptWhere.DistributionChannels = obj;
concept.ConceptWhere.DstrChnlCommaSeperated = "y";
concept.ConceptWhere.LocallyInpired = 1;
concept.ConceptWhere.QualifyDistributionChannel = "y";
concept.ConceptWhere.Regions = obj;
concept.ConceptWhere.RegionsCommaSeparated = "y";
concept.ConceptWho.Age = "";
concept.ConceptWho.CompetitiveBenchmark = "y";
concept.ConceptWho.ConceptId = 1;
var i = new List<int>();
concept.ConceptWho.MarketObjectiveIds = i;
concept.ConceptWho.PricingStrategy = "gd";
concept.ConceptWho.Income = "nice";
concept.ConceptWho.MarketObjectiveIds = i;
concept.ConceptWho.PricingStrategy = "aa";
concept.ConceptWho.Sex = 1;
concept.ConceptWho.SourceofSalesVolumeIds = obj;
concept.ConceptWho.StrMarketObjectiveIds = "1";
concept.ConceptWho.StrsourceofSalesVolumeIds = "1";
concept.ConceptWho.TargetCustomer = "1";
concept.ConceptWho.TargetMarketSize = 1;
concept.ConceptWho.TargetMrktOpportunity = "";
concept.ConceptWhy.BrandStrategyId = 1;
concept.ConceptWhy.ConceptId = 1;
concept.ConceptWhy.CrptStrategyCategoryId = "p";
concept.ConceptWhy.ProductCompetitiveAdv = "p";




currentresult = AboutBal.SaveUpdateAbout(concept);
// bool bb = false;
}
// Assert.AreEqual(currentresult.payload,expected);
//Assert.AreEqual<responsemessage>(null, currentresult.payload., "Insert Failed");
//Assert.AreEqual<responsemessage>(message,currentresult.payload);
Assert.AreEqual
amritbdk 13-Feb-14 7:43am View    
function SaveStrategy() {
var priority = 0;

this.disabled = true;
var Strategyid = $('#lblHiddenfield').val();
$('#tblGridAnalyze').trigger("reloadGrid");
var SFC = "";

$('input[name="multiselect_SltFiscalYear"]:checked').each(function () {
SFC += this.value + ";";
});

var sfcdetails = SFC.replace(/;\s*$/, "");
if (AddStretagyValidations()) {
$.ajax({
cache: false, async: false,
url: '/StrategyBuilder/SaveStrategy?strategyTitle=' + $("#txtStrategyTitle").val() + '&MBC=' + selMajorBusinessCategory.value + '&fiscalYear=' + sfcdetails + '&id=' + Strategyid,
datatype: 'json',
type: 'POST',
success: function (response) {
alert("Strategy saved successfully.");
$('#tblGrid').trigger("reloadGrid");
$('#divStrategy').dialog('close');
$('#txtStrategyTitle').val('');
$('#selMajorBusinessCategory').val('');
$('#SltFiscalYear').val('');

}
});
}
}
This code is not getting # value in the strategy title tb
amritbdk 25-Jan-14 13:45pm View    
can u reffer me the book which will be best for me
amritbdk 25-Jan-14 13:39pm View    
Thanks,But as i m new to mvc i want to know how and where i have to write rhe codes for it.
amritbdk 10-Aug-13 4:53am View    
pls explain with a eg