public void srm_whenSameNameWithSpaceInPunctionaion_returnsTrue() { var srm1 = new Srm(5, "Deep Amber / Light Copper", 10, 14); var srm2 = new Srm(5, "Deep Amber/Light Copper", 10, 14); Assert.IsTrue(srm1.Equals(srm2)); }
public void SrmViewModel_setupIncorrectly_Fails() { var srm = new Srm(1, "Straw", 2, 3); var srmVm = new SrmViewModel(srm); Assert.IsFalse(srmVm.Correct); }
public void srm_whenSameNameWithoutPunctuation_returnsTrue2() { var srm1 = new Srm(12, "black, opaque", 40); var srm2 = new Srm(12, "black opaque", 40); Assert.IsTrue(srm1.Equals(srm2)); }
public void SrmViewModel_setupCorrectly_Succeeds() { var userSrm = new Srm(1, "Straw", 2, 3); var srmVm = new SrmViewModel(userSrm); Assert.IsTrue(srmVm.Correct); }
public SrmViewModel(Srm srm) { this.Id = srm.Id; this.Name = srm.Name; this.Low = srm.Low; this.High = srm.High; }
public void SrmViewModel_setupCorrectly_Succeeds() { var userSrm = new Srm(1, "Straw", 2,3); var srmVm = new SrmViewModel(userSrm); Assert.IsTrue(srmVm.Correct); }
public void srm_yellow_equalsOtherYellow() { var srm1 = new Srm(2, "Yellow", 3, 4); var srm2 = new Srm(2, "Yellow", 3, 4); Assert.IsTrue(srm1.Equals(srm2)); }
public void srm_empty_equalsFalse() { var yellow = new Srm(2, "Yellow", 3, 4); var empty = new Srm(); Assert.IsFalse(yellow.Equals(empty)); }
public void srm_null_equalsFalse() { var yellow = new Srm(2, "Yellow", 3, 4); Srm nullSrm = null; Assert.IsFalse(yellow.Equals(nullSrm)); }
// // GET: /Srm/ public ActionResult Index() { var quiz = new SrmQuizViewModel(); quiz.UserSrms = Srm.GetQuiz(); quiz.Message = ""; return(View(quiz)); }
public ActionResult Index(SrmQuizViewModel quiz) { var comparer = new SrmComparer(Srm.GetMasterSrms()); comparer.QuizSrms = quiz.UserSrms; quiz.Message = comparer.IsCorrect() ? "Correct" : "Incorrect"; return(View(quiz)); }
public void srm_yellow_isSetProperly() { var yellow = new Srm(2, "Yellow", 3, 4); Assert.AreEqual(2, yellow.Id); Assert.AreEqual("Yellow", yellow.Name); Assert.AreEqual(3, yellow.Low); Assert.AreEqual(4, yellow.High); }
public void srm_straw_isSetProperly() { var straw = new Srm(1, "Straw", 2, 3); Assert.AreEqual(1, straw.Id); Assert.AreEqual("Straw", straw.Name); Assert.AreEqual(2, straw.Low); Assert.AreEqual(3, straw.High); }
public MyBeer(Glass glass, Srm srm, Available available, Style style, List <Brewery> breweries, Labels labels, List <SocialAccount> socialAccounts) { Glass = glass; Srm = srm; Available = available; Style = style; Breweries = breweries; Labels = labels; }
public void SrmViewModel_setup_hasPropertiesSet() { var srm = new Srm(1, "Straw", 2, 3); var srmVm = new SrmViewModel(srm); Assert.AreEqual(1, srmVm.Id); Assert.AreEqual("Straw", srmVm.Name); Assert.AreEqual(2, srmVm.Low); Assert.AreEqual(3, srmVm.High); }
private void btnRun_Click(object sender, EventArgs e) { #if EX_SCRIPT Srm.RunCompiledScript(Script); Srm.InvokeFunctionIfExisted(((FunctionListItem)functionList.SelectedItem).Function.Name); #endif // EX_SCRIPT if (chkCloseAfterRun.Checked) { Close(); } }
internal void RaiseRangeDataChangedEvent(RangePosition range) { if (!this.suspendDataChangedEvent) { if (RangeDataChanged != null) { RangeDataChanged(this, new RangeEventArgs(range)); } #if EX_SCRIPT if (this.Srm != null && this.worksheetObj != null) { var ondatachange = Srm.DefaultContext.EvaluatePropertyGet(this.worksheetObj, "ondatachange"); if (ondatachange != null) { Srm.InvokeFunctionIfExisted(this.worksheetObj, "ondatachange", new RSRangeObject(this, range)); } } #endif } }
public void srm_quiz_hasNoNames() { var quiz = Srm.GetQuiz(); Assert.IsTrue(quiz.All(srm => String.IsNullOrWhiteSpace(srm.Name))); }
public void srm_black_stringIsDisplayed() { var black = new Srm(11, "Black", 30); Assert.AreEqual("Black - 30+", black.ToString()); }
public void srm_yellow_stringIsDisplayed() { var yellow = new Srm(2, "Yellow", 3, 4); Assert.AreEqual("Yellow - 3, 4", yellow.ToString()); }
public void Setup() { var orderedSrms = Srm.GetMasterSrms(); comparer = new SrmComparer(orderedSrms); }