Search Results

Search found 4765 results on 191 pages for 'gh unit'.

Page 91/191 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • Ruby get inheriting class

    - by Brian D.
    I'm working on creating my first plugin for rails. I'm still pretty new to ruby and I was wondering if its possible to get the inheriting class? For example, I'm trying to create a plugin that will allow unit testing and functional testing when you are not using migrations. What I'm trying to do is initialize a class variable named controller to be initialized to the type of controller that is being tested. If I have a base class ControllerTest: class ControllerTest < Test::Unit::TestCase attr_accessor :controller def initialize super @controller = "call function that will find the inheriting classes name and create an instance of that controller type." end end So what I'm currently stuck on is getting the name of the inheriting class. Is this possible? And if not, does anyone know another way on how I could go about implementing this? Thanks in advance.

    Read the article

  • Anyone have experience calling Rake from MSBuild for code gen and other benefits? How did it go? Wha

    - by Charlie Flowers
    While programming in C# using Visual Studio 2008, I often wish for "automatic" code generation. If possible, I'd like to achieve it by making my MSBuild solution file call out to Rake, which would call Ruby code for the code generation, having the resulting generated files automatically appear in my solution. Here's one business example (of many possible examples I could name) where this kind of automatic code generation would be helpful. In a recent project I had an interface with some properties that contained dollar amounts. I wanted a second interface and a third interface that had the same properties as the first interface, except they were "qualified" with a business unit name. Something like this: public interface IQuarterlyResults { double TotalRevenue { get; set; } double NetProfit { get; set; } } public interface IConsumerQuarterlyResults { double ConsumerTotalRevenue { get; set; } double ConsumerNetProfit { get; set; } } public interface ICorporateQuarterResults { double CorporateTotalRevenue { get; set; } double CorporateNetProfit { get; set; } } In this example, there is a "Consumer Business Unit" and a "Corporate Business Unit". Every property on IQuarterlyResults becomes a property called "Corporate" + [property name] on ICorporateQuarterlyResults, and likewise for IConsumerQuarterlyResults. Why make interfaces for these, rather than merely having an instance of IQuarterlyResults for Consumer and another instance for Corporate? Because, when working with the calculator object I was building, the user had to deal with 100's of properties, and it is much less confusing if he can deal with "fully qualified" property names such as "ConsumerNetProfit". But let's not get bogged down in this example. It is only an example and not the main question. The main question is this: I love using Ruby and ERB for code generation, and I love using Rake to manage dependencies between tasks. To solve the problem above, what I'd like to do is have MSBuild call out to Rake, and have Rake / Ruby read the list of properties on the "core" interface and then generate the code to make all the dependent interfaces and their properties. This would get triggered every time I do a build, because I'd put it into the MSBuild file for the VS.NET solution. Has anyone tried anything like this? How did it work out for you? What insights can you share about pros, cons, tips for success, etc.? Thanks!

    Read the article

  • ruby tests - error messages don't include line numbers or file name

    - by joshs
    Hi all, How do I get line numbers to be reported with my errors when testing. Here is what I get back on a typical error: josh@josh-laptop:~/d/test$ ruby unit/line_test.rb -n test_update Loaded suite unit/line_test Started E Finished in 0.066663 seconds. 1) Error: test_update(LineTest): NameError: undefined local variable or method `sdf' for #<LineTest:0xb6e61304> 1 tests, 0 assertions, 0 failures, 1 errors It is tough to debug without a line number and filename. From the code samples I've seen, people generally get back a more verbose error reports. How do I enable this? Thanks!

    Read the article

  • Solutions for redundant server and client code?

    - by Fragsworth
    In our system, the code which exists on the client side (in Flash and Javascript) mirrors the code that exists on the server side (e.g. in Python or PHP), normally with respect to the models, the methods available for those models, and the unit tests written for them. This becomes a problem in systems where you want to minimize data transfer (e.g. multiplayer games). I do not want to write the same code and unit tests redundantly for both the client and server, but I don't know of any standard solutions to deal with this. Basically, I want a language/compiler which can produce models and methods for three main languages: Actionscript, Javascript, and any server language. Does something like this exist?

    Read the article

  • Devising a test strategy

    - by Simon Callan
    As part of a new job, I have to devise and implement a complete test strategy for the companies new product. So far, all I really know about it is that it is written in C++, uses an SQL database and has a web API which is used by a browser client written using GWT. As far as I know, there isn't much of an existing strategy, except for using Python scripts to test the web API. I need to develop and implement a suitable strategy for unit, system, regression and release testing, preferably a fully automated one. I'm looking for good references for : Devising the complete test strategy. Testing the web API. Testing the GWT based application. Unit testing C++ code. In addition, any suitable tools would be appreciate

    Read the article

  • ajax and servlet

    - by kawtousse
    Hi everyone I am using ajax to send a value to a servlet with that parameter value I must display a table HTML. from my JSP when sending with following: xhr.open("POST","ServletImputOPC",true); xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); var unit =document.getElementById('unit').value; xhr.send("t[0]="+t[0]); it returns the clause in my servlet correctly witch is: parameter received:Nameof my parameter. that is improve that the servlet receive the parameter. But when using it in the servlet it return a null value. So the problem that the servlet return the parameter received but did not able to use it. What should I do to resolve it. Many thinks.

    Read the article

  • eclipse: calling organizeimports programmatcally

    - by Stefan Roka
    Hi, I'm trying to execute 'OrganizeImports' programmatically on files that I'm editing programmatically. My code looks like this: final ICommandService cmdService = (ICommandService)PlatformUI.getWorkbench().getService (ICommandService.class); if (cmdService != null) { final Command cmd = cmdService.getCommand(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS); final ExecutionEvent execEvt = new ExecutionEvent(cmd, Collections.EMPTY_MAP, compileationUnit, null); PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); ResourcesPlugin.getWorkspace(). Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { //cmd.executeWithChecks(execEvt); cmd.execute(execEvt); } catch (Exception e) { getLogger().severe("organize imports failed: " + e.getMessage()); } } My problem is that OrganizeImportsAction executes on the current selection which is not the same as the compilation unit I'm editing. I would like to set the selection programmatically on the compilation unit but I don't know how to do that. Or maybe there is another way to trigger OrganizeImports. thanks, stefan

    Read the article

  • BDD / TDD with JSpec - Removing code duplication

    - by Chetan
    How do I refactor to remove the code duplication in this spec: describe 'TestPlugins' describe '.MovieScanner(document)' before_each MoviePage_loggedIn = fixture("movie_logged_in.html") // Get logged-in movie page MoviePage_notloggedIn = fixture("movie_not_logged_in.html") // Get non logged-in movie page scanner = new MovieScanner() // Get movie scanner end it 'should scan logged-in movie page for movie data' doc = MoviePage_loggedIn // Get document to scan // Unit Tests // ------------------------------------------------------------ // Test movie scanner's functions scanner.getMovieTitle(doc).should.eql "The Jacket" scanner.getMovieYear(doc).should.eql "2005" // Test movie scanner's main scan function scannedData = scanner.scan(doc) scannedData.title.should.eql "The Jacket" scannedData.year.should.eql "2005" end it 'should scan non logged-in movie page for movie data' doc = MoviePage_notloggedIn // Get document to scan // Unit Tests // ------------------------------------------------------------ // Test movie scanner's functions scanner.getMovieTitle(doc).should.eql "The Jacket" scanner.getMovieYear(doc).should.eql "2005" // Test movie scanner's main scan function scannedData = scanner.scan(doc) scannedData.title.should.eql "The Jacket" scannedData.year.should.eql "2005" end end end

    Read the article

  • Testing Zend_Controller wich is using Twitter API

    - by ArneRie
    Hi, iam trying to write an unit test for an Controller wich calls the Twitter API through an Service class. /** * Authenticate Step 1 for Twitter */ public function authenticateAction() { $this->service->authenticate(); } The Service does: /** * Authenticate with twitter * * @return void */ public function authenticate() { $consumer = new Zend_Oauth_Consumer($this->config); $token = $consumer->getRequestToken(); $this->session->twitterRequestToken = serialize($token); $consumer->redirect(); exit; } My Problem is, i have no idea to repleace the authenticate action inside the service for the unit test. I dont want to call the Twitter API while the tests run. Is there any Mocking Framework wich can do such things?

    Read the article

  • Group MySQL Data into Arbitrarily Sized Time Buckets

    - by Eric J.
    How do I count the number of records in a MySQL table based on a timestamp column per unit of time where the unit of time is arbitrary? Specifically, I want to count how many record's timestamps fell into 15 minute buckets during a given interval. I understand how to do this in buckets of 1 second, 1 minute, 1 hour, 1 day etc. using MySQL date functions, e.g. SELECT YEAR(datefield) Y, MONTH(datefield) M, DAY(datefield) D, COUNT(*) Cnt FROM mytable GROUP BY YEAR(datefield), MONTH(datefield), DAY(datefield) but how can I group by 15 minute buckets?

    Read the article

  • Seam Equivalent of Spring PersistenceUnitPostProcessor

    - by shipmaster
    We have a very comfortable setup using JPA through Spring/Hibernate, where we attach a PersistenceUnitPostProcessor to our entity manager factory, and this post processor takes a list of project names, scans the classpath for jars that contain that name, and adds those jar files for scanning for entities to the persistence unit, this is much more convenient than specifying in persistence.xml since it can take partial names and we added facilities for detecting the different classpath configurations when we are running in a war, a unit test, an ear, etc. Now, we are trying to replace Spring with Seam, and I cant find a facility to accomplish the same hooking mechanism. One Solution is to try and hook Seam through Spring, but this solution has other short-comings on our environment. So my question is: Can someone point me to such a facility in Seam if exists, or at least where in the code I should be looking if I am planning to patch Seam? Thanks.

    Read the article

  • Code in Global.asax prevents webpage from loading

    - by pete the pagan-gerbil
    I've made a static class to hold a number of configuration values (and also swap these values out in unit tests). If I initialise it in the Global.asax, the code runs correctly but the page doesn't load at all, and trying to navigate to a specific page fails. I can't initialise the values in a constructor or inline on the field declarations, because I need to be able to swap the values out in unit tests before the web.config is interrogated. Basically, putting the one line "ConfigClass.SetValues()" in the Global.asax prevents the app from loading correctly (although, as I say, it runs the code fine) and removing it again makes the app load properly - but without the class values initialised. As an aside, I'm sure I had this working correctly and being initialised in the Global.asax yesterday. I'm positive I didn't take any action to change or break it... Does anyone have advice on how I might track down what's going on here? Was I mistaken that it worked before (always possible) and that I need to go back and redesign something?

    Read the article

  • Type patterns in Haskell

    - by finnsson
    I'm trying to compile a simple example of generic classes / type patterns (see http://www.haskell.org/ghc/docs/latest/html/users_guide/generic-classes.html) in Haskell but it won't compile. Any ideas about what's wrong with the code would be helpful. According to the documentation there should be a module Generics with the data types Unit, :*:, and :+: but ghc (6.12.1) complaints about Not in scope: data constructor 'Unit' etc. It seems like there's a package instant-generics with the data types :*:, :+: and U but when I import that module (instead of Generics) I get the error Illegal type pattern in the generic bindings {myPrint _ = ""} The complete source code is import Generics.Instant class MyPrint a where myPrint :: a -> String myPrint {| U |} _ = "" myPrint {| a :*: b |} (x :*: y) = "" (show x) ++ ":*:" ++ (show y) myPrint {| a :+: b |} _ = "" data Foo = Foo String instance MyPrint a => MyPrint a main = myPrint $ Foo "hi" and I compile it using ghc --make Foo.hs -fglasgow-exts -XGenerics -XUndecidableInstances P.S. The module Generics export no data types, only the functions: canDoGenerics mkGenericRhs mkTyConGenericBinds validGenericInstanceType validGenericMethodType

    Read the article

  • Do invariant assertions fit into C# programming?

    - by P.Brian.Mackey
    In the book coders at work, the author asks "How do you use invariants in your code". Please explain what this question means. I saw class invariants on wiki, but the example is in Java and I am not skilled enough in Java to relate this example to C#. .NET 4.0 introduces invariance, covariance, and contravariance and is well explained here. Invariance is so broad. The authors usage of the word seems unit test related. For those that read the book, what does the author mean? Are we talking about making an assumption and simply testing the validity after the unit test?

    Read the article

  • ASP.NET MVC NullReferenceException when inheriting from a Base Controller

    - by rockinthesixstring
    I've got a base controller that I inherit all of my Controllers from. It's job is to basically set caching and error handling as well as check for mobile browsers. My UI works fine, but my Unit Tests are failing. Imports System.Web.Mvc <HandleError()> _ <CompressFilter()> _ <OutputCache(Duration:=30, VaryByParam:="id")> _ Public Class BaseController : Inherits System.Web.Mvc.Controller Protected Overrides Function View(ByVal viewName As String, ByVal masterName As String, ByVal model As Object) As System.Web.Mvc.ViewResult Dim ismobile As Nullable(Of Boolean) = Request.Browser.IsMobileDevice If ismobile Then Return MyBase.View(viewName, "Mobile", model) Else Return MyBase.View(viewName, "Site", model) End If End Function End Class The error I'm getting in my Unit test is on Dim ismobile As Nullable(Of Boolean) = Request.Browser.IsMobileDevice saying Object Reference Not Set To An Instance Of An Object.

    Read the article

  • having trouble with jpa, looks to be reading from cache when told to ignore

    - by jeff
    i'm using jpa and eclipselink. it says version 2.0.2.v20100323-r6872 for eclipselink. it's an SE application, small. local persistence unit. i am using a postgres database. i have some code the wakes up once per second and does a jpa query on a table. it's polling to see whether some fields on a given record change. but when i update a field in sql, it keeps showing the same value each time i query it. and this is after waiting, creating a new entitymanager, and giving a query hint. when i query the table from sql or python, i can see the changed field. but from within my jpa query, once i've read the value, it never changes in later executions of the query -- even though the entity manager has been recreated. i've tried telling it to not look in the cache. but it seems to ignore that. very puzzling, can you help please? here is the method. i call this once every 3 seconds. the tgt.getTrlDlrs() println shows me i get the same value for this field on every call of the method ("value won't change"). even if i change the field in the database. when i query the record from outside java, i see the change right away. also, if i stop the java program and restart it, i see the new value printed out immediately: public void exitChk(EntityManagerFactory emf, Main_1 mn){ // this will be a list of the trade close targets that are active List<Pairs01Tradeclosetgt> mn_res = new ArrayList<Pairs01Tradeclosetgt>(); //this is a list of the place number in the array list above //of positions to close ArrayList<Integer> idxsToCl = new ArrayList<Integer>(); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.clear(); String qryTxt = "SELECT p FROM Pairs01Tradeclosetgt p WHERE p.isClosed = :isClosed AND p.isFilled = :isFilled"; Query qMn = em.createQuery(qryTxt); qMn.setHint(QueryHints.CACHE_USAGE, CacheUsage.DoNotCheckCache); qMn.setParameter("isClosed", false); qMn.setParameter("isFilled", true); mn_res = (List<Pairs01Tradeclosetgt>) qMn.getResultList(); // are there any trade close targets we need to check for closing? if (mn_res!=null){ //if yes, see whether they've hit their target for (int i=0;i<mn_res.size();i++){ Pairs01Tradeclosetgt tgt = new Pairs01Tradeclosetgt(); tgt = mn_res.get(i); System.out.println("value won't change:" + tgt.getTrlDlrs()); here is my entity class (partial): @Entity @Table(name = "pairs01_tradeclosetgt", catalog = "blah", schema = "public") @NamedQueries({ @NamedQuery(name = "Pairs01Tradeclosetgt.findAll", query = "SELECT p FROM Pairs01Tradeclosetgt p"), @NamedQuery(name = "Pairs01Tradeclosetgt.findByClseRatio", query = "SELECT p FROM Pairs01Tradeclosetgt p WHERE p.clseRatio = :clseRatio")}) public class Pairs01Tradeclosetgt implements Serializable { private static final long serialVersionUID = 1L; @Id @Basic(optional = false) @Column(name = "id") @SequenceGenerator(name="pairs01_tradeclosetgt_id_seq", allocationSize=1) @GeneratedValue(strategy=GenerationType.SEQUENCE, generator = "pairs01_tradeclosetgt_id_seq") private Integer id; and my persitence unit: <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="testpu" transaction-type="RESOURCE_LOCAL"> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> <class>mourv02.Pairs01Quotes</class> <class>mourv02.Pairs01Pair</class> <class>mourv02.Pairs01Trderrs</class> <class>mourv02.Pairs01Tradereq</class> <class>mourv02.Pairs01Tradeclosetgt</class> <class>mourv02.Pairs01Orderstatus</class> <properties> <property name="javax.persistence.jdbc.url" value="jdbc:postgresql://192.168.1.80:5432/blah"/> <property name="javax.persistence.jdbc.password" value="secret"/> <property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/> <property name="javax.persistence.jdbc.user" value="noone"/> </properties> </persistence-unit> </persistence>

    Read the article

  • ScheduledThreadPoolExecutor executing a wrong time because of CPU time discrepancy

    - by richs
    I'm scheduling a task using a ScheduledThreadPoolExecutor object. I use the following method: public ScheduledFuture<?> schedule(Runnable command, long delay,TimeUnit unit) and set the delay to 30 seconds (delay = 30,000 and unit=TimeUnit.MILLISECONDS). Sometimes my task occurs immediately and other times it takes 70 seconds. I believe the ScheduledThreadPoolExecutor uses CPU specific clocks. When i run tests comparing System.currentTimeMillis(), System.nanoTime() [which is CPU specific] i see the following schedule: 1272637682651ms, 7858346157228410ns execute: 1272637682667ms, 7858386270968425ns difference is 16ms but 4011374001ns (or 40,113ms) so it looks like there is discrepancy between two CPU clocks of 40 seconds How do i resolve this issue in java code? Unfortunately this is a clients machine and i can't modify their system.

    Read the article

  • What does the following FORTRAN code do?

    - by Jon Skeet
    C AREA OF A TRIANGLE WITH A STANDARD SQUARE ROOT FUNCTION C INPUT - CARD READER UNIT 5, INTEGER INPUT C OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUT C INPUT ERROR DISPLAY ERROR OUTPUT CODE 1 IN JOB CONTROL LISTING READ (5, 501) IA, IB, IC 501 FORMAT (3I5) C IA, IB, AND IC MAY NOT BE NEGATIVE C FURTHERMORE, THE SUM OF TWO SIDES OF A TRIANGLE C IS GREATER THAN THE THIRD SIDE, SO WE CHECK FOR THAT, TOO IF (IA) 777, 777, 701 701 IF (IB) 777, 777, 702 702 IF (IC) 777, 777, 703 703 IF (IA+IB-IC) 777,777,704 704 IF (IA+IC-IB) 777,777,705 705 IF (IB+IC-IA) 777,777,799 777 STOP 1 C USING HERON'S FORMULA WE CALCULATE THE C AREA OF THE TRIANGLE 799 S = FLOATF (IA + IB + IC) / 2.0 AREA = SQRT( S * (S - FLOATF(IA)) * (S - FLOATF(IB)) * + (S - FLOATF(IC))) WRITE (6, 601) IA, IB, IC, AREA 601 FORMAT (4H A= ,I5,5H B= ,I5,5H C= ,I5,8H AREA= ,F10.2, + 13H SQUARE UNITS) STOP END plz i need to know soon!!!!!

    Read the article

  • Why do MSTests Assert.AreEqual(1.0, double.NaN, 0.0) pass?

    - by Egil Hansen
    Short question, why do Assert.AreEqual(1.0, double.NaN, 0.0) pass when Assert.AreEqual(1.0, double.NaN) do not? Is it an error in MSTest or am I missing something here? Best regards, Egil. Update: Should probably add, that the reason behind my question is, that I have a bunch of unit tests that unfortunately passed due to the result of some linear algebraic matrix operation being NaN or (+/-)Infinity. The unit tests are fine, but since Assert.AreEqual on doubles with a delta will pass when actual or/and expected are NaN or Infinity, I was left to believe that the code I was testing was correct.

    Read the article

  • Delphi: OnTimer event of my own Timer never happens

    - by Mikhail
    I need a Timer in a 'no form' Delphi unit, so I do this: unit ... interface type TMyTimer = Class(TTimer) public procedure OnMyTimer(Sender: TObject); end; var MyTimer: TMyTimer; implementation procedure TMyTimer.OnMyTimer(Sender: TObject); begin ... end; initialization MyTimer := TMyTimer.Create(nil); with MyTimer do begin Interval := 1000; Enabled := True; OnTimer := OnMyTimer; end; finalization FreeAndNil(MouseTimer); The problem is that the OnMyTimer procedure is never run. I'll truly appreciate any ideas as to why :-)

    Read the article

  • Add code before initialization of units in Delphi

    - by Alan Clark
    Is there a place where I can add code that will be executed before unit initialization? The reason I want to do this is I need to change the DecimalSeparator, this has to be done before the initialization of some units. I have put it in the project source, before Application.Initialize but it is too late by then. As I see it the only choice I have is to put it in the initialization of the unit that needs the DecimalSeparator to be changed, is this the case? Thanks in advance for any advice.

    Read the article

  • C# Generics Casting

    - by Nippysaurus
    Visual sutdio 2008 has the ability to automatically create unit test stubs. I have used this to create some basic unit tests, but I am confused by something: private class bla : BaseStoreItem { // } /// <summary> ///A test for StoreData ///</summary> public void StoreDataTestHelper<T>() where T : BaseStoreItem { FileStore<T> target = new FileStore<T>(); // TODO: Initialize to an appropriate value BaseStoreItem data = new bla(); target.StoreData(data); } [TestMethod()] public void StoreDataTest() { //Assert.Inconclusive("No appropriate type parameter is found to satisfies the type constraint(s) of T. " + // "Please call StoreDataTestHelper<T>() with appropriate type parameters."); StoreDataTestHelper<bla>(); } Why do I get "Error: Cannot convert type 'StorageUnitTests.FileStoreTest.bla' to 'T'" when T is type "bla"? I know "bla" is not a good function name, but its just an example.

    Read the article

  • jquery on click sibling selection

    - by Deviland
    I generate a Table from a database to look like this <table id="items"> <thead> <tr> <th>Details</th> <th>Goldmine ID</th> <th>&nbsp;</th> </tr> </thead> <tbody> <tr> <td class="evenrow">This is a test Description generated through UNIT Tests for the category description</td> <td class="evenrow"><input type="text" value="" id="106" class="gminput"></td> <td class="butCell evenrow"><button class="saveButton updateitem">Update</button></td> </tr> <tr> <td class="oddrow">This is a test Description generated through UNIT Tests for the category description</td> <td class="oddrow"><input type="text" value="" id="107" class="gminput"></td> <td class="butCell oddrow"><button class="saveButton updateitem">Update</button></td> </tr> <tr> <td class="evenrow">This is a test Description generated through UNIT Tests for the category description</td> <td class="evenrow"><input type="text" value="" id="108" class="gminput"></td> <td class="butCell oddrow"><button class="saveButton updateitem">Update</button></td> </tr> </tbody> </table> I am trying to get the input box value and id returned by the relevant row's button click so far I have tried this but failed $('body').on('click', '.updateitem', function(event) { event.preventDefault(); $(this).parent().siblings().forEach(function(index) { alert(($(this).val())); }); var par = sib.parent('td'); par.addClass('redBorder'); });

    Read the article

  • How to make django test framework read from live database?

    - by lfborjas
    I realize there's a similar question here, but this one has a different approach: I have a django app that does queries over data indexed with djapian ; I'd like to write unit tests for this app's search component, and, obviously, I'd need the django settings module and all connections with the database active, so the test runner that django provides seems ideal. however, the django testing framework creates a dummy database and I'd hate to dump all my data to a fixture and then index it (the tests would take forever!); My data isn't at risk because the tests would only read from the database, so, how could this be achieved? -I'm new at this whole unit testing thing, so the solution of writing a new test runner I read in that similar question doesn't enlighten me a bit, at least not without some details

    Read the article

  • How to clear a cookie programatically?

    - by peter
    Hi All, I am using silverlight unit tests to test an important part of our site. Is it possible to clear cookies before each unit test runs? The problem is that if I do this, HtmlPage.Document.Cookies = ""; It doesn't work. If the cookie already was this, key = value I can do this, HtmlPage.Document.Cookies = "key="; It kind of clears it out, but the string "key" is still part of the cookie. Any ideas? Are there any other classes in .NET that deal with cookies? The functionality seems quite limited when I am dealing with more complicated scenarios.

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >