public void InterfaceExample_MethodA() { //Arrange var interfaceExample = new InterfaceExample(); //Act Execute(interfaceExample); }
public void InterfaceTestMethod() { InterfaceExample _ie = new InterfaceExample(); double _val = _ie[c_OkIndex]; _ie[1] = new Random().NextDouble(); Assert.AreNotEqual(_val, _ie[c_OkIndex]); }
public void InteraceCountTestMethod() { InterfaceExample _ie = new InterfaceExample(); int _length = 0; foreach (double _item in _ie) { _length++; } Assert.AreEqual(_length, _ie.Count); }
public void RoundtripInterfaceProperties() { AssumingDeserializerWith(new LambdaObjectFactory(t => { if (t == typeof(InterfaceExample)) { return new InterfaceExample(); } else if (t == typeof(IDerived)) { return new Derived(); } return null; })); var obj = new InterfaceExample { Derived = new Derived { BaseProperty = "foo", DerivedProperty = "bar" } }; var result = DoRoundtripFromObjectTo<InterfaceExample>(obj); result.Derived.Should().BeOfType<Derived>().And .Subject.As<IDerived>().ShouldBeEquivalentTo(new { BaseProperty = "foo", DerivedProperty = "bar" }, o => o.ExcludingMissingMembers()); }
public void InterfaceExceptionTestMethod() { InterfaceExample _ie = new InterfaceExample(); double _val = _ie[c_WrongIndex]; }