public void SelectMethodsFromNullTypeThrows() { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => sut.SelectMethods(null)); // Teardown }
public void SelectMethodsFromNullTypeThrows() { // Arrange var sut = new RhinoMockConstructorQuery(); // Act & Assert Assert.Throws <ArgumentNullException>(() => sut.SelectMethods(null)); }
public void SelectMethodsReturnsCorrectNumberOfMethodsForInterface(Type t) { // Arrange var sut = new RhinoMockConstructorQuery(); // Act var result = sut.SelectMethods(t); // Assert Assert.Single(result); }
public void SelectMethodsFromNullTypeThrows() { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.SelectMethods(null)); // Teardown }
public void SelectMethodsReturnsCorrectNumberOfMethodsForInterface(Type t) { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome Assert.Equal(1, result.Count()); // Teardown }
public void SelectMethodsReturnsResultWithNoParametersForInterface(Type t) { // Arrange var sut = new RhinoMockConstructorQuery(); // Act var result = sut.SelectMethods(t); // Assert var method = Assert.IsAssignableFrom <RhinoMockConstructorMethod>(result.Single()); Assert.Empty(method.Parameters); }
public void SelectMethodsReturnsCorrectResultForInterface(Type t) { // Arrange var sut = new RhinoMockConstructorQuery(); // Act var result = sut.SelectMethods(t); // Assert var method = Assert.IsAssignableFrom <RhinoMockConstructorMethod>(result.Single()); Assert.Equal(t, method.MockTargetType); }
public void SelectMethodsReturnsCorrectResultForNonInterfaces(Type t) { // Arrange var expectedCount = t.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Length; var sut = new RhinoMockConstructorQuery(); // Act var result = sut.SelectMethods(t); // Assert Assert.Equal(expectedCount, result.Count()); }
public void SelectMethodsReturnsCorrectNumberOfMethodsForInterface(Type t) { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome Assert.Equal(1, result.Count()); // Teardown }
public void SelectMethodsReturnsCorrectResultForInterface(Type t) { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome var method = Assert.IsAssignableFrom<RhinoMockConstructorMethod>(result.Single()); Assert.Equal(t, method.MockTargetType); // Teardown }
public void SelectMethodsReturnsCorrectResultForNonInterfaces(Type t) { // Fixture setup var expectedCount = t.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Length; var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome Assert.Equal(expectedCount, result.Count()); // Teardown }
public void SelectMethodsReturnsResultWithNoParametersForInterface(Type t) { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome var method = Assert.IsAssignableFrom <RhinoMockConstructorMethod>(result.Single()); Assert.Empty(method.Parameters); // Teardown }
public void SelectMethodsReturnsCorrectResultForInterface(Type t) { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome var method = Assert.IsAssignableFrom <RhinoMockConstructorMethod>(result.Single()); Assert.Equal(t, method.MockTargetType); // Teardown }
public void SelectMethodsReturnsCorrectResultForNonInterfaces(Type t) { // Fixture setup var expectedCount = t.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Length; var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome Assert.Equal(expectedCount, result.Count()); // Teardown }
public void SelectMethodsReturnsResultWithNoParametersForInterface(Type t) { // Fixture setup var sut = new RhinoMockConstructorQuery(); // Exercise system var result = sut.SelectMethods(t); // Verify outcome var method = Assert.IsAssignableFrom<RhinoMockConstructorMethod>(result.Single()); Assert.Empty(method.Parameters); // Teardown }