public void IfIDontPassAnObjectToMethodOneItFails()
 {
     try
     {
         classToTest = new ClassOne(new object());
         classToTest.MethodOne(null);
         Assert.Fail();
     }
     catch (NotObjectPassedException)
     {
         Assert.IsTrue(true);
     }
 }
 public void MethodOneDoesSomeThingAndReturnsSomething()
 {
     classToTest = new ClassOne(new object());
     var result = classToTest.MethodOne(new List());
     Assert.IsTrue(result);
 }
 public void MethodOneDoesSomethingAndReturnsOtherThing()
 {
     classToTest = new ClassOne(new object());
     var result = classToTest.MethodOne(string.Empty);
     Assert.IsFalse(result);
 }
예제 #4
0
 public void MethodOneDoesSomeThingAndReturnsSomething()
 {
     classToTest = new ClassOne(new object());
     var result = classToTest.MethodOne(new List());
     result.Should().Be(true);
 }
예제 #5
0
 public void MethodOneDoesSomethingAndReturnsOtherThing()
 {
     classToTest = new ClassOne(new object());
     var result = classToTest.MethodOne(string.Empty);
     result.Should().Be(false);
 }
예제 #6
0
 public void IfIDontPassAnObjectToMethodOneItFails()
 {
     classToTest = new ClassOne(new object());
     Action act = () => classToTest.MethodOne(null);
     act.ShouldThrow<NotObjectPassedException>();
 }