Beispiel #1
0
        public void CreateTest()
        {
            Mock<IIdeaBoxRepository> mockIdeaRepo = new Mock<IIdeaBoxRepository>();

            Guid testGuid = Guid.NewGuid();

            Box testBox = new Box(testGuid);
            testBox.Name = "Test title";
            testBox.Description = "Test Description";
            testBox.Referrer = "http://test.idea.com/List";
            testBox.IsPrivate = false;

            BoxService target = new BoxService(mockIdeaRepo.Object);
            string title = "Test title";
            string description = "Test Description";
            string referrer = "http://test.idea.com/List";
            bool isPrivate = false;

            Box expected = testBox;

            Box actual;
            actual = target.Create(title, description, referrer, isPrivate);

            Assert.IsTrue(expected.Name == actual.Name);
            Assert.IsTrue(expected.Description == actual.Description);
            Assert.IsTrue(expected.Referrer == actual.Referrer);
            Assert.IsTrue(expected.IsPrivate == actual.IsPrivate);
        }
Beispiel #2
0
 public void DeleteTest()
 {
     IIdeaBoxRepository ideaRepo = null; // TODO: Initialize to an appropriate value
     BoxService target = new BoxService(ideaRepo); // TODO: Initialize to an appropriate value
     Box box = null; // TODO: Initialize to an appropriate value
     target.Delete(box);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Beispiel #3
0
 public void GetByReferrerTest()
 {
     IIdeaBoxRepository ideaRepo = null; // TODO: Initialize to an appropriate value
     BoxService target = new BoxService(ideaRepo); // TODO: Initialize to an appropriate value
     string referrer = string.Empty; // TODO: Initialize to an appropriate value
     IList<Box> expected = null; // TODO: Initialize to an appropriate value
     IList<Box> actual;
     actual = target.GetByReferrer(referrer);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Beispiel #4
0
 public void BoxService_NULL_Constructor_Test()
 {
     IIdeaBoxRepository mockIdeaRepo = null;
     BoxService target = new BoxService(mockIdeaRepo);
 }
Beispiel #5
0
 public void GetByIdTest()
 {
     IIdeaBoxRepository ideaRepo = null; // TODO: Initialize to an appropriate value
     BoxService target = new BoxService(ideaRepo); // TODO: Initialize to an appropriate value
     Guid id = new Guid(); // TODO: Initialize to an appropriate value
     Box expected = null; // TODO: Initialize to an appropriate value
     Box actual;
     actual = target.GetById(id);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }