public void CreateWillReturnFalseOnSecondCall() { // Arrange BooleanSwitch sut = new BooleanSwitch(); sut.Create(); // Act bool result = sut.Create(); // Assert Assert.False(result, "CreateAnonymous called an even number of times"); }
public void CreateWillReturnFalseOnSecondCall() { // Fixture setup BooleanSwitch sut = new BooleanSwitch(); sut.Create(); // Exercise system bool result = sut.Create(); // Verify outcome Assert.False(result, "CreateAnonymous called an even number of times"); // Teardown }
public void CreateWithBooleanRequestWillReturnCorrectResultOnSecondCall() { // Arrange var booleanRequest = typeof(bool); var sut = new BooleanSwitch(); // Act var dummyContainer = new DelegatingSpecimenContext(); sut.Create(booleanRequest, dummyContainer); var result = sut.Create(booleanRequest, dummyContainer); // Assert Assert.False((bool)result); }
public void CreateWithBooleanRequestWillReturnCorrectResultOnSecondCall() { // Fixture setup var booleanRequest = typeof(bool); var sut = new BooleanSwitch(); // Exercise system var dummyContainer = new DelegatingSpecimenContext(); sut.Create(booleanRequest, dummyContainer); var result = sut.Create(booleanRequest, dummyContainer); // Verify outcome Assert.False((bool)result); // Teardown }
public void CreateWithNullContainerDoesNotThrow() { // Arrange var sut = new BooleanSwitch(); // Act var dummyRequest = new object(); sut.Create(dummyRequest, null); // Assert (no exception indicates success) }
public void CreateWillReturnTrueOnFirstCall() { // Arrange BooleanSwitch sut = new BooleanSwitch(); // Act bool result = sut.Create(); // Assert Assert.True(result, "CreateAnonymous called an uneven number of times"); }
public void CreateWithNullContainerDoesNotThrow() { // Fixture setup var sut = new BooleanSwitch(); // Exercise system var dummyRequest = new object(); sut.Create(dummyRequest, null); // Verify outcome (no exception indicates success) // Teardown }
public void CreateWithNullRequestWillReturnCorrectResult() { // Arrange var sut = new BooleanSwitch(); // Act var dummyContainer = new DelegatingSpecimenContext(); var result = sut.Create(null, dummyContainer); // Assert Assert.Equal(new NoSpecimen(), result); }
public void CreateWithNullRequestWillReturnCorrectResult() { // Fixture setup var sut = new BooleanSwitch(); // Exercise system var dummyContainer = new DelegatingSpecimenContext(); var result = sut.Create(null, dummyContainer); // Verify outcome Assert.Equal(new NoSpecimen(), result); // Teardown }
public void CreateWithNonBooleanRequestWillReturnCorrectResult() { // Arrange var nonBooleanRequest = new object(); var sut = new BooleanSwitch(); // Act var dummyContainer = new DelegatingSpecimenContext(); var result = sut.Create(nonBooleanRequest, dummyContainer); // Assert var expectedResult = new NoSpecimen(); Assert.Equal(expectedResult, result); }
public void CreateWithNonBooleanRequestWillReturnCorrectResult() { // Fixture setup var nonBooleanRequest = new object(); var sut = new BooleanSwitch(); // Exercise system var dummyContainer = new DelegatingSpecimenContext(); var result = sut.Create(nonBooleanRequest, dummyContainer); // Verify outcome var expectedResult = new NoSpecimen(nonBooleanRequest); Assert.Equal(expectedResult, result); // Teardown }