Skip to content

Instantly share code, notes, and snippets.

@eldewall
Created December 18, 2013 14:38
Show Gist options
  • Save eldewall/8023375 to your computer and use it in GitHub Desktop.
Save eldewall/8023375 to your computer and use it in GitHub Desktop.
public interface IEmediateAd {
int ContentUnit { get; }
string Url { get; }
int Height { get; }
int Width { get; }
}
public class Loader {
public string Load(IEmediateAd ad) {
return "EAS_load_fif(eas_13, EAS_fif.html, url, 0 ,0)";
}
}
[TestMethod]
public void TestPrintsEasLoadStringBasedOnAd() {
var ad = MockRepository.GenerateMock<IEmediateAd>();
ad.Stub(x => x.ContentUnit).Return(5);
ad.Stub(x => x.Url).Return("http:");
ad.Stub(x => x.Height).Return(0);
ad.Stub(x => x.Width).Return(0);
var loader = new Loader();
Assert.AreEqual("EAS_load_fif(EAS_5, EAS_fif.html, http, 0 ,0)", loader.Load(ad));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment