Skip to content

Instantly share code, notes, and snippets.

View efleming969's full-sized avatar

Erick Fleming efleming969

  • Fleming Services, LLC
  • Frankfort, KY
View GitHub Profile
{
"name": "app",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": ""
},
"devDependencies": {
"mocha": "",
"chai": "",
function fizzbuzz (num) {
var x = parseInt(num, 10)
function isDisibileBy3 (x) {
return x % 3 == 0
}
function isDisibileBy5 (x) {
return x % 5 == 0
describe("FizzBuzz", function () {
it("should print fizz for multiples of 3", function () {
var multiplesOfThree = [3, 6, 18];
for (var i = 0; i < multiplesOfThree.length; i++) {
var result = app.fizzbuzz(multiplesOfThree[i]);
expect(result).to.eql("fizz");
}
});
var express = require("express")
var http = require("http")
var path = require("path")
var app = express()
app.configure(function () {
app.use(express.favicon())
app.use(express.logger("dev"))
app.use(express.bodyParser())
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MockingLib;
using NSubstitute;
namespace MockingTests {
[TestClass]
public class SimpleExamples {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MockingLib {
public interface IRepo {
object Get();
void Put(string p);
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MockingLib {
public class Hello {
private IRepo repo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FizzBuzz {
public class Game {
public object Play(int number) {
if (number % 3 == 0 && number % 5 == 0) {
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using FizzBuzz;
namespace FizzBuzzTests {
[TestClass]
public class GameTest {
[TestMethod]

Rules

Print numbers from 1 to 60 For multiples of three print "Fizz" instead of the number For Multiples of five print "Buzz" instead of the number For Multiples of three and five print "FizzBuzz" instead of number

Sample Output