public void ShouldReturnUnknownActionIfActionIsntAvailable() { Mock.Get(request).SetupGet(_request => _request.FileNameWithoutExtension) .Returns("ThisAintNoAction").Verifiable(); Mock.Get(objectSource).Setup(_objectSource => _objectSource.GetByName("thisaintnoaction")) .Returns(null).Verifiable(); Assert.IsTrue(actionFactory.Create(request) is UnknownActionAction); mocks.VerifyAll(); }
public void ShouldReturnUnknownActionIfActionIsntAvailable() { Expect.Call(request.FileNameWithoutExtension) .Return("ThisAintNoAction"); Expect.Call(objectSource.GetByName("thisaintnoaction")) .Return(null); mocks.ReplayAll(); Assert.IsTrue(actionFactory.Create(request) is UnknownActionAction); mocks.VerifyAll(); }