Q:if i ask a question, where does it go and how do i see the answer? is this powered by a magic 8 ball?
Reply hazy, try again
Why using test coverage as a metric is stupid
Adding a useless test to increase test coverage check.
[TestMethod]
[ExpectedException(typeof(NotImplementedException))]
public void AddUsersToRolesTest()
{
Roles.AddUsersToRoles(new string[] { }, new string[] { });
}
Easter eggs jQuery plugin
I decided that a project I was working in needed more monsters so I created a quick jQuery plugin to add them, have fun.
//Change image
//<div data-swapcss-value='url("imageurl.png")'>
//Full options
//<div data-swapcss-property='background-color' data-swapcss-value='red' data-swapcss-count="3">
var swapCssConfig = {}
var swapCssConfig.currentCount = 0;
(function ($) {
$.fn.swapCSS = function (options) {
var settings = jQuery.extend({
clickCount: 6,
property: 'background-image'
}, options);
var currentElement = this;
currentElement.click(function () {
warningClickCount++;
if (swapCssConfig.currentCount > (settings.clickCount - 1)) {
currentElement.css(settings.property, settings.value);
currentElement.unbind('click');
}
});
};
$(document).ready(function () {
$('[data-swapcss-value]').each(function (index) {
var item = $(this);
var options = { value: item.attr('data-swapcss-value') };
if (item.attr('data-swapcss-count') !== undefined)
options.clickCount = item.attr('data-swapcss-count');
if (item.attr('data-swapcss-property') !== undefined)
options.property = item.attr('data-swapcss-property');
item.swapCSS(options);
});
});
})(jQuery);
Page 1 of 11